diff options
| author | Richard Burke <rich.g.burke@gmail.com> | 2016-05-08 14:05:25 +0100 |
|---|---|---|
| committer | Richard Burke <rich.g.burke@gmail.com> | 2016-05-08 14:06:13 +0100 |
| commit | cd89f1c9898ae02033faab34d72f2e14981088ec (patch) | |
| tree | eab55a7cb24659167dab682eae75fb5dbedb591a /main.c | |
| parent | c15076cd44fa89b3ee9f4411ea43b8cdf14f45f8 (diff) | |
| download | vis-cd89f1c9898ae02033faab34d72f2e14981088ec.tar.gz vis-cd89f1c9898ae02033faab34d72f2e14981088ec.tar.xz | |
Fix autoindent when using O
Diffstat (limited to 'main.c')
| -rw-r--r-- | main.c | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -1947,7 +1947,11 @@ static const char *openline(Vis *vis, const char *keys, const Arg *arg) { vis_motion(vis, VIS_MOVE_LINE_END); vis_keys_feed(vis, "<insert-newline>"); } else { - vis_motion(vis, VIS_MOVE_LINE_BEGIN); + 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>"); } return keys; |
