diff options
| author | Marc André Tanner <mat@brain-dump.org> | 2017-01-28 14:16:04 +0100 |
|---|---|---|
| committer | Marc André Tanner <mat@brain-dump.org> | 2017-01-28 14:18:45 +0100 |
| commit | 007ff80b477880e820d08391b96ca2a00889082e (patch) | |
| tree | ff564565cd377a0966beb913d2f86bf7a6a80ece /main.c | |
| parent | 043a183d1465f578775e2a28bdc0a5c44afccd40 (diff) | |
| download | vis-007ff80b477880e820d08391b96ca2a00889082e.tar.gz vis-007ff80b477880e820d08391b96ca2a00889082e.tar.xz | |
vis: deindent blank autoindented lines when leaving insert mode
Does not work for the current implementation of `O` because the
"lookbehind" i.e. second to last processed key is `<Up>` and not
`<Enter>`.
Fix #383
Diffstat (limited to 'main.c')
| -rw-r--r-- | main.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -1975,14 +1975,14 @@ static const char *openline(Vis *vis, const char *keys, const Arg *arg) { vis_operator(vis, VIS_OP_MODESWITCH, VIS_MODE_INSERT); if (arg->i > 0) { vis_motion(vis, VIS_MOVE_LINE_END); - vis_keys_feed(vis, "<insert-newline>"); + vis_keys_feed(vis, "<Enter>"); } else { if (vis_get_autoindent(vis)) { vis_motion(vis, VIS_MOVE_LINE_START); } else { vis_motion(vis, VIS_MOVE_LINE_BEGIN); } - vis_keys_feed(vis, "<insert-newline><Up>"); + vis_keys_feed(vis, "<Enter><Up>"); } return keys; } |
