This commit fixes a few problems introduced by the last Scintilla update.
That update caused some headache around the incompatible changes to
SCI_GETTEXT
, SCI_GETSELTEXT
, and SCI_GETCURLINE
.
An explicit NUL termination was added to sci_get_text()
. This is both
superflous and wrong (it writes behind the allocated buffer) as SCI_GETTEXT
already does NUL termination.
In sci_get_contents()
, sci_get_string() cannot be used. That would call
SCI_GETTEXT with length == 0 which is not the desired outcome. Instead,
basically revert to the old implementation but account for the API change.
The callers of sci_get_selected_text_length() must be adapted, this
was missing yet. sci_get_selected_text_length() return value does not
include the NUL termination anymore.
Resolves #3095
Fixes: d7c985e ("Adapt to SCI_GETTEXT changes")
https://github.com/geany/geany/pull/3098
(2 files)
—
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications on the go with GitHub Mobile for iOS or Android.
You are receiving this because you are subscribed to this thread.