After a replace all of a highlighted name (eg typename in c/c++) some of the occurrences of the replaced name are not highlighted.
Theorum:
I think the mechanism is:
1. do the replace, the replacements are not highlighted since the new name is not yet parsed by ctags as a typename.
2. a few 100 ms later the parser runs and the list of names is updated
3. but it seems only the part of the file from the first visible line to the end is invalidated since occurrences of the name before that position in the file are not highlighted, until something happens to invalidate that part of the file, then they are highlighted
Solution:
Probably the whole file should be invalidated after any parser update that changes the name lists, since its not known what part of the file this will impact.
--- 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/1020
Probably due to #575 I guess.
--- 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/1020#issuecomment-216597548
That was the one I was looking for, my search wasn't good enough.
--- 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/1020#issuecomment-216686022
Unfortunately b361b83 won't cleanly revert on git HEAD.
--- 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/1020#issuecomment-216731988
@techee can you look at how to fix, as I said on #575 we NEED the whole document re-highlighted if the wordlists change, otherwise Geany operations that use highlighting to guide them will fail.
--- 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/1020#issuecomment-216732360
I've committed https://github.com/geany/geany/pull/1022 which should hopefully fix this issue. @elextr would you give it a try? I can't completely reproduce it here.
@techee can you look at how to fix, as I said on #575 we NEED the whole document re-highlighted if the wordlists change, otherwise Geany operations that use highlighting to guide them will fail.
As far as I can tell, there's nothing in Geany relying on the highlighting information - I believe it's sufficient to let Scintilla highlight the invisible parts of the document lazily as it gets scrolled.
What is needed is to get the whole document lexed at the beginning to get the fold points right. However, subsequent edits should update fold information in scintilla so full relexing shouldn't be needed after every keystroke.
--- 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/1020#issuecomment-216824260
Closed #1020 via d95111d4cd02e51eac90f814c4cd24ed8014a4c6.
--- 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/1020#event-677149255
github-comments@lists.geany.org