diff options
author | Griffin Smith <grfn@gws.fyi> | 2020-07-09T14·50-0400 |
---|---|---|
committer | glittershark <grfn@gws.fyi> | 2020-07-09T14·51+0000 |
commit | e63b0ea8925da55bb48ead5c285962d221b5b492 (patch) | |
tree | f5fc649d345a13c64eab39990971ef0cfa72ad5a /users | |
parent | e2e15791854178ab36d90c19005c5994b95e21c8 (diff) |
fix(gs/emacs): Trim input strings for ERC r/1244
I send a lot of accidental newlines after messages because my muscle memory is very intent on hitting "o" to get into insert mode. Change-Id: Iecd469d1d8d2053e68837b3b65399cb272d7fc29 Reviewed-on: https://cl.tvl.fyi/c/depot/+/958 Reviewed-by: glittershark <grfn@gws.fyi>
Diffstat (limited to 'users')
-rw-r--r-- | users/glittershark/emacs.d/irc.el | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/users/glittershark/emacs.d/irc.el b/users/glittershark/emacs.d/irc.el index 8ff48e994efb..1b634dec78f4 100644 --- a/users/glittershark/emacs.d/irc.el +++ b/users/glittershark/emacs.d/irc.el @@ -106,6 +106,8 @@ If the buffer is currently not visible, makes it sticky." (add-hook 'erc-connect-pre-hook 'my-erc-define-alerts) +(advice-add #'erc-user-input :filter-return #'s-trim) + (comment (my-erc-define-alerts) ) |