[Github-comments] [geany/geany] When "go to line" is out of bounds, go to beginning or end of document (PR #2973)

elextr notifications at xxxxx
Sun Oct 31 01:24:19 UTC 2021


Tested ok, except if the user enters 0 gets the warning: "(geany:6625): Geany-CRITICAL **: 10:51:24.814: editor_goto_line: assertion 'line_no >= 0' failed"

Scintilla docs for `gotoline` say numbered from 0 and thats the only place I can find that explicitly specifies it.

But the margins are numbered from 1 and entering a number goes to the start of the line with that margin number.  Geany uses `getposfromline` and `gotopos` not `gotoline` so maybe that compensates in some way?????  I'm confused.

Anyway maybe its better to only warn on < 0 and silently change 0 to 1 rather than give a warning for user input of 0.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/pull/2973#issuecomment-955619387
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.geany.org/pipermail/github-comments/attachments/20211030/f0545323/attachment.htm>


More information about the Github-comments mailing list