This is my naive attempt at solving #1136. It works for me (not heavily tested yet), but I’m not sure if it’s a good idea. I would appreciate any feedback.
Geany’s message window is sort of detached from the editor. In general, it’s just lines of text that are not parsed or associated with the files in question until the user wants to navigate to one of them (although there are some exceptions).
Constrained by this design, I bolted on a cache of line number shifts. Actually two caches: one for the messages tab (`line_shifts_msg`) and one for the compiler tab (`line_shifts_compiler`). A cache is cleared when the user initiates a search/build (`msgwindow_clear_tab`), and then updated whenever the user adds/deletes lines in *any* open file (`SCN_MODIFIED` with a non-zero `linesAdded`), as long as *any* messages/errors are present. A cache is a hash table where keys are filenames and values are sequences of “at line, lines added” pairs (`LineShift`).
This of course means some overhead on mundane editing operations. Line numbers are requested from Scintilla, filename hashes are computed, arrays may need to be resized. Some of this overhead could be optimized out, but I’m not sure it’s worth it.
Also, this approach doesn’t handle undo very well. If there’s a compiler error on line 3, and I delete that entire line, and then undo the deletion, navigating to that error will now bring me to line 2 instead of 3, because the undo is understood as inserting an unrelated new line.
A possibly cleaner and/or more efficient approach might be to rely on Scintilla’s features such as line markers or indicators. That would probably require some revamp of the message window: lines would have to be parsed eagerly and associated with those Scintilla features as long as the corresponding file is open. I haven’t tried that approach.
You can view, comment on, or merge this pull request online at:
https://github.com/geany/geany/pull/1481
-- Commit Summary --
* Track changes to line numbers for messages and compiler errors
-- File Changes --
M src/build.c (2)
M src/editor.c (26)
M src/msgwindow.c (130)
M src/msgwindow.h (4)
M src/search.c (4)
-- Patch Links --
https://github.com/geany/geany/pull/1481.patchhttps://github.com/geany/geany/pull/1481.diff
--
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/1481
How-to:
* Start spell-checking a large document (I used a 4MB file that I can provide, if needed)
* Close said file while the spell-checking is still ongoing
* Geany crashes
Trace:
```
$ geany -v
...
SpellCheck-Message: Checking file "**redacted**" (using "en_US" (myspell)):
Errore di segmentazione
```
--
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-plugins/issues/547
When I try to use ctrl + l go open the Go to line... dialog box, the box does not appear.
--
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/1488
When spell check is on, any word in single quotes is seen as misspelled. If the word is in double quotes it is not. Please see the screen shot.
Thanks for reading,
LA
![geanyspellcheck](https://cloud.githubusercontent.com/assets/123256/25632335/47424582-2f41-11e7-8066-cb5a42007f6a.png)
--
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/1486
One of the disadvantages of the "Backup Copy" action in the Save Actions plugin (mentioned [in the Wiki](https://wiki.geany.org/config/all_you_never_wanted_to_know_about_file…) is that it fills up the disk with an ever growing number of files. I think it would be nice if there was an option to only keep the last `N` versions of a file.
--
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/1491
On filetypes common it says: "# translucency for the line marker(first argument) and the search marker (second argument)
marker_translucency=255;255"
However changing the 2nd argument does NOT affect search marker translucency.
The proposed change addresses this.
On the downside: current hard-coded value of 60 (very transparent) would become filetypes.common's default of 255 (no transparency).
On the upside:
1) we would be consistent with what is indicated in filetypes.common about translucency for the search marker
2) this change may help all DARK themes, since marked words are barely visible no matter the GCS_MARKER_SEARCH background color used. By changing the translucency we can make them standout, just like in white themes.
You can view, comment on, or merge this pull request online at:
https://github.com/geany/geany/pull/1490
-- Commit Summary --
* Fix search marker translucency (currently ignoring scheme)
-- File Changes --
M src/highlighting.c (2)
-- Patch Links --
https://github.com/geany/geany/pull/1490.patchhttps://github.com/geany/geany/pull/1490.diff
--
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/1490