[Github-comments] [geany/geany] Scintilla 5.1.5 aftermath (PR #3098)

Thomas Martitz notifications at xxxxx
Tue Jan 11 21:54:51 UTC 2022


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: d7c985e47 ("Adapt to SCI_GETTEXT changes")
You can view, comment on, or merge this pull request online at:

  https://github.com/geany/geany/pull/3098

-- Commit Summary --

  * Scintilla 5.1.5 aftermath

-- File Changes --

    M src/sciwrappers.c (20)
    M src/ui_utils.c (4)

-- Patch Links --

https://github.com/geany/geany/pull/3098.patch
https://github.com/geany/geany/pull/3098.diff

-- 
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/pull/3098
You are receiving this because you are subscribed to this thread.

Message ID: <geany/geany/pull/3098 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.geany.org/pipermail/github-comments/attachments/20220111/e24a4326/attachment.htm>


More information about the Github-comments mailing list