Branch: refs/heads/master Author: Jiří Techet techet@gmail.com Committer: Jiří Techet techet@gmail.com Date: Sat, 05 Oct 2019 08:13:51 UTC Commit: 49a7f6a45ace55780adff5ed3ce9ab4159178842 https://github.com/geany/geany-plugins/commit/49a7f6a45ace55780adff5ed3ce9ab...
Log Message: ----------- vimode: Make o/O respect auto indentation
Fixes #910.
Modified Paths: -------------- vimode/src/cmds/changemode.c
Modified: vimode/src/cmds/changemode.c 16 lines changed, 12 insertions(+), 4 deletions(-) =================================================================== @@ -120,7 +120,6 @@ void cmd_enter_insert_next_line(CmdContext *c, CmdParams *p) { SSM(p->sci, SCI_LINEEND, 0, 0); SSM(p->sci, SCI_NEWLINE, 0, 0); - SSM(p->sci, SCI_DELLINELEFT, 0, 0); c->num = p->num; c->newline_insert = TRUE; vi_set_mode(VI_MODE_INSERT); @@ -129,9 +128,18 @@ void cmd_enter_insert_next_line(CmdContext *c, CmdParams *p)
void cmd_enter_insert_prev_line(CmdContext *c, CmdParams *p) { - SSM(p->sci, SCI_HOME, 0, 0); - SSM(p->sci, SCI_NEWLINE, 0, 0); - SSM(p->sci, SCI_LINEUP, 0, 0); + if (p->line == 0) + { + SSM(p->sci, SCI_HOME, 0, 0); + SSM(p->sci, SCI_NEWLINE, 0, 0); + SSM(p->sci, SCI_LINEUP, 0, 0); + } + else + { + SSM(p->sci, SCI_LINEUP, 0, 0); + SSM(p->sci, SCI_LINEEND, 0, 0); + SSM(p->sci, SCI_NEWLINE, 0, 0); + } c->num = p->num; c->newline_insert = TRUE; vi_set_mode(VI_MODE_INSERT);
-------------- This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).
plugins-commits@lists.geany.org