Adds optional linewrapping in the status-, compiler- and message-tab of the message window. Mainly useful with a vertical layout, but still has some issues: - on_width_change() is called continuously while resizing the message window, (I did not notice any impact on CPU usage though). - when changing the setting, messages already present are not wrapped / unwrapped, only newly printed ones. - when resizing the window, messages already present are wrapped only until a new line would be required (but new messages work fine). - Only very minor, but GTK word wrap treats the minus preceding command line arguments as separate words (-> 'gcc -Wall' can become 'gcc -\nWall')
I hope it's not rude to make a pull request directly without first opening a corresponding issue. You can view, comment on, or merge this pull request online at:
https://github.com/geany/geany/pull/1383
-- Commit Summary --
* Add option for linewrapping in message window * Correct minor inconsistency: return type not on same line as function
-- File Changes --
M data/geany.glade (96) M doc/geany.txt (4) M src/keyfile.c (2) M src/msgwindow.c (57) M src/msgwindow.h (2) M src/prefs.c (7) M src/ui_utils.h (1)
-- Patch Links --
https://github.com/geany/geany/pull/1383.patch https://github.com/geany/geany/pull/1383.diff
on_width_change() is called continuously while resizing the message window,
(I did not notice any impact on CPU usage though).
So long as it works on a Raspberry PI as well as your Cray :grin: (Geany is included in Raspbian IIUC)
when changing the setting, messages already present are not wrapped / unwrapped,
only newly printed ones.
Seems fair, this isn't the sort of setting that you flick on and off, set it when going to message win vertical and leave it there. And you can always regenerate compiler errors.
when resizing the window, messages already present are wrapped only until
a new line would be required (but new messages work fine)
Not sure I understand this, how can it be wrapped in any way without requiring a new line?
I hope it's not rude to make a pull request directly without first opening a corresponding issue.
Thats ok, just with no prior discussion you don't know if any of the contributors are interested and if it will get any traction. I personally doubt I would want this, making the C++ error novel longer is not a good idea. (my "personal best" is 3000 lines of errors for one missing character, try reading that wrapped).
Not sure I understand this, how can it be wrapped in any way without requiring a new line?
Yes that wasn't very clear, sorry. What I meant was that if an already present message is for example split to two lines due to the wrapping and you make the window smaller, words from the end of the first line are added to the beginning of the second as expected. But if the second line then gets too long a third line is not added, the second line keeps getting elongated.
Thats ok, just with no prior discussion you don't know if any of the contributors are interested and if it will get any traction. I personally doubt I would want this, making the C++ error novel longer is not a good idea. (my "personal best" is 3000 lines of errors for one missing character, try reading that wrapped).
Yes that's true, the reason I did it this way is that I made this together with #1381, so I already had the code.
While it can happen that you get a huge amount of error messages (3000 lines is very impressive :smile:), at least in my use case it usually doesn't and not having to scroll right to read the whole error message would outweigh the disadvantages of longer output.
Since this is a personal preference maybe it would be nice to have the option to enable it, then again if it's something nobody would use it wouldn't make sense to add it.
Closed #1383.
github-comments@lists.geany.org