[Github-comments] [geany/geany] Track changes to line numbers and positions as a document is edited (#1136)

Vasiliy Faronov notifications at xxxxx
Wed Jul 13 19:04:09 UTC 2016


1. Do something (Find in Files) to populate the list of messages or compiler errors.
2. Jump to the first message/error. Let’s say it refers to `foo.c`:123.
3. Edit `foo.c` in such a way that you add 3 more lines at that point. In other words, text that used to be on lines 124+ is now on lines 127+, respectively.
4. Jump to the next message/error. Let’s say it refers to `foo.c`:345.
5. I want Geany to take me to `foo.c`:348, because the text that the message refers to is now on line 348. Instead, Geany takes me nonchalantly to `foo.c`:345.

A similar but different thing happens with the navqueue. The navqueue stores Scintilla positions, which, too, start referring to different text as the document is edited. (Please let me know if you want me to file this as a separate issue.)

Things that are maintained by Scintilla itself, such as bookmarks and indicators (squiggly underlines), do not suffer from this problem. Perhaps Geany could tap into that somehow?

Otherwise, I guess Geany could do some bookkeeping where it handles `SCN_MODIFIED` and then transparently rewrite line numbers in `msgwin_goto_messages_file_line()`. Sadly, I am not up to this task. But please let me know if there is any other way I can help, as currently this is by far the biggest problem I have with Geany.

---
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/issues/1136
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.geany.org/pipermail/github-comments/attachments/20160713/98b17549/attachment.html>


More information about the Github-comments mailing list