Scintilla 3.7.6/4.0.0 deprecated `SCE_*STYLEBITS*` and moved it to
deprecated features that require a build-time flag to be available.
Thus, drop use of those (as they are now no-ops anyway) and bump the
ABI (so plugins depending on those don't build mistakenly load) and API
(so a developer can guard use of those if wanted) version accordingly.
Since 320e4b9d762e0bd7d550c62be614873db5a04ac4 the "smart line
indentation" explicitly doesn't restore cursor position, and doesn't
make use of the position parameter, which no caller really use anyway.
Remove it altogether to avoid confusion.
Add a defensive check to make sure to catch the unlikely but maybe
theoretically possible case where the document last document is closed
while the Save As dialog is running.
Before, **boldface** or *italics* (also _italics_) would not generally show as that, definitely not with the default color scheme. After this change, they appear with the same color as normal text but with that typography, in all color schemes.
Our custom scroll handler for horizontal (Shift+Scroll) and page
(Alt+Scroll) scroll didn't properly check the scroll direction and
assume that if it's not down it's up. This was mostly not a problem
because the other types only were left and right scroll events, which
are a lot less common.
However, it became a lot more problematic with GTK 3.4 that introduced
"smooth scrolling", and thus a new scroll type that can happen for
events in any direction. We then would scroll up (as we assume "not
down" is up) regardless of the actual direction of the event.
It's still not clear why we'd get smooth scroll events on X11 as no
code I can find asks for it and we generally don't get those, but
sometimes a Scintilla widget starts receiving them, leading to the bug.
On Wayland on the other hand, Scintilla asks for smooth scroll events,
so we need to have a fix for it in any case.
Make the brief text be distinct between msgwin_*_add and msgwin_*_add_string().
Also add @see directives where appropriate. Lastly, add @since to
msgwin_status_add() for completeness.
The variadic variants cannot be gobject-introspected, i.e. are not available
in Peasy.
In fact, msgwin_compiler_add_string() and msgwin_msg_add_string() already
existed and have just been exported. msgwin_status_add_string() is new but
msgwin_status_add() becaume a wrapper around it in the same fashion as the
other two pairs.
This prevents loading a spurious tag for the format specifier line, as
well as fixing loading of CTags format with a format specifier line.
Before this change, the file pointer was rewound after reading a format
specifier line; but this had various unwanted side effects depending on
the recognized format:
* For TagManager and Pipe formats, it led to loading a tag named after
the format specifier (e.g. a literal "# format=tagmanager"). This
was fairly harmless and only introduced a spurious tag seldom even
used because "#" isn't usually considered for looking up completions.
* For CTags format, having an explicit specifier led to failure to load
the file in most cases because the specifier line would be parsed but
doesn't usually follow the format's requirements, leading to early
abortion loading that file. On some very specific specifier lines
actually following CTags format, it could have led to loading a
spurious tag instead.
Fixes#1814 and closes#1816.
On "Save As..." a text in the form 'untitled.ext' will be replaced with the chosen
filename if it is found in the first 3 lines of the document. This PR adds a description
of the feature to the manual. Fixes#753.
When toggling a plugin, we temporarily set the tree store's row entry
for the plugin pointer to NULL as we destroy and reload the selected
plugin, and its pointer would be invalid in the meantime. This results
in the filter we use to display search results to temporarily hide the
row, changing the actual number of rows and thus, depending on timing,
this will or will not change the selected row (it will when double
clicking, not when single-clicking), in a seemingly more or less random
fashion as we use a sorted model.
Finally, as we manually update the buttons visibility for the toggled
plugin (as we otherwise do only for changing selection, which should
not happen in this case -- well, most of the time as you can see), this
can lead to the buttons to be updated for a now unselected row, getting
those out of sync.
The fix here is not to actually hide rows with a NULL plugin, because
it can only happen in 2 cases, where we actually want to see it:
1. while toggling a plugin, as explained above, in which case it had to
match the search already.
2. when there is no plugins and we want to display a "No plugins
available" message, and the search should not affect this.
This incidentally also fix the "No plugins available" so it's actually
visible, instead of always hidden.
Fixes#1781.