[Github-comments] Re: [geany/geany-plugins] Vimode: fix cursor position after using undo (PR #1328)

2024-05-08 Thread Jiří Techet via Github-comments
But this isn't really what vim does, is it? Try the following with this patch: 1. Delete a line in the middle of a file. 2. Scroll to the top of the file so you have the cursor e.g. on the first line 3. Press `u` The undo happens but your cursor is still on the first line instead of being at the

[Github-comments] Re: [geany/geany-plugins] Vimode: Fix cursor hang with folded lines (PR #1326)

2024-05-08 Thread Jiří Techet via Github-comments
@techee requested changes on this pull request. Looks good except for the minor comments below. I was actually thinking about not doing this at all because it doesn't cover all fold/unfold situations like e.g. using Geany's keybindings for folding but the patch is simple and better than nothing

[Github-comments] Re: [geany/geany-plugins] Vimode: Fix cursor hang with folded lines (PR #1326)

2024-05-08 Thread Jiří Techet via Github-comments
@techee commented on this pull request. > @@ -40,42 +40,53 @@ void cmd_goto_right(CmdContext *c, CmdParams *p) SET_POS(p->sci, pos, TRUE); } +static gint doc_line_from_visible_delta(CmdParams *p, gint line, gint delta, gint *previous) +{ + gint step = delta < 0 ? -1 : 1; +

[Github-comments] Re: [geany/geany-plugins] Vimode: Fix cursor hang with folded lines (PR #1326)

2024-05-08 Thread Jiří Techet via Github-comments
> After read the https://sourceforge.net/p/scintilla/bugs/2438/ report, I think > the best way to automatically set the cursor position on the visible line is > surely to track the SCN_MARGINCLICK event. I did some modification to handle > this with the commit > [5608b74](https://github.com/gea

[Github-comments] Re: [geany/geany-plugins] vimode: Handle folded lines correctly (PR #1338)

2024-05-08 Thread Jiří Techet via Github-comments
@techee pushed 1 commit. fa7025ba9d58fb4680fb47e13bd5c05c6f1f1059 Fix motion problems with line wrapping -- View it on GitHub: https://github.com/geany/geany-plugins/pull/1338/files/aeaaf3a895e75f44d4dab7d6211bb1bd93b69648..fa7025ba9d58fb4680fb47e13bd5c05c6f1f1059 You are receiving this because