This PR addresses some issues of the plugin with folded lines - see the individual commits.
I'd also like to automatically set the cursor position when a block gets folded to be set on the visible line (and not hidden somewhere inside the fold) but right now I don't know how to correctly react to the fold events - see https://sourceforge.net/p/scintilla/bugs/2438/
@scresto09 Do the changes look OK to you and does the plugin behave correctly with them? You can view, comment on, or merge this pull request online at:
https://github.com/geany/geany-plugins/pull/1338
-- Commit Summary --
* vimode: Take into account folded lines when moving cursor * vimode: Ensure that the line with the cursor is expanded after performing a command
-- File Changes --
M vimode/src/cmd-runner.c (1) M vimode/src/cmds/motion.c (58) M vimode/src/excmd-runner.c (2) M vimode/src/utils.c (9) M vimode/src/utils.h (1)
-- Patch Links --
https://github.com/geany/geany-plugins/pull/1338.patch https://github.com/geany/geany-plugins/pull/1338.diff
Hello,
After read the [https://sourceforge.net/p/scintilla/bugs/2438/%5D(https://sourceforge.net/p/...) 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/geany/geany-plugins/pull/1326/commits/5608b74cba25b571428...) in pull request [#1326](https://github.com/geany/geany-plugins/pull/1326)
What do you think about this ? Thanks
It seems there are some issues with the changes in commit [907b9bc](https://github.com/geany/geany-plugins/pull/1338/commits/907b9bc9830e601119e...), for example the cursor can no longer go up to the first line, or when some lines wrap.
I've made some changes to try and fix this with the commit [274ff97](https://github.com/geany/geany-plugins/pull/1326/commits/274ff97f51e65b02ae8...) . What do you think about this ? Thanks
@techee pushed 1 commit.
fa7025ba9d58fb4680fb47e13bd5c05c6f1f1059 Fix motion problems with line wrapping
@techee pushed 1 commit.
7ae19de41e7d45c1c97a96b06ade67d80edf26a1 Don't update cursor position when going down on the last line
@techee pushed 2 commits.
522b79dc7b1f25576e4bf44277f5e49bfa46cd9d vimode: Take into account folded lines when moving cursor 33984abc9bd24bbf03db3ac517eb45ca2c7e6b7f vimode: Ensure that the line with the cursor is expanded after performing a command
Merged #1338 into master.
OK, it's works fine, thanks
I just create #1349 for SCN_MARGINCLICK part.
github-comments@lists.geany.org