From 6bc214bb6d408e09aee856f9a0aad8eea7db4b95 Mon Sep 17 00:00:00 2001 From: "METANEOCORTEX\\Kotti" Date: Thu, 9 Dec 2021 13:24:23 +0100 Subject: [PATCH] +upd: to Scintilla Lib v.5.1.5 (incl. adapt. for length queries on Sci-Calls: SCI_GETTEXT, SCI_GETSELTEXT, and SCI_GETCURLINE) --- scintilla/doc/ScintillaDoc.html | 24 ++--- scintilla/doc/ScintillaDownload.html | 10 +- scintilla/doc/ScintillaHistory.html | 50 ++++++++++ scintilla/doc/ScintillaRelated.html | 4 + scintilla/doc/index.html | 13 +-- scintilla/scripts/HeaderOrder.txt | 1 + scintilla/src/AutoComplete.cxx | 5 + scintilla/src/Document.cxx | 89 ++++-------------- scintilla/src/Editor.cxx | 69 +++++++------- scintilla/version.txt | 2 +- scintilla/win32/HanjaDic.cxx | 122 ++++++++++++------------- scintilla/win32/HanjaDic.h | 4 +- scintilla/win32/PlatWin.cxx | 5 +- scintilla/win32/PlatWin.h | 31 ------- scintilla/win32/ScintRes.rc | 4 +- scintilla/win32/ScintillaWin.cxx | 12 +-- scintilla/win32/WinTypes.h | 58 ++++++++++++ scintilla/win32/deps.mak | 4 +- scintilla/win32/nmdeps.mak | 4 +- src/Edit.c | 132 +++++++++++++-------------- src/Edit.h | 2 +- src/Notepad3.c | 51 +++++------ src/SciCall.h | 9 +- src/Styles.c | 8 +- 24 files changed, 365 insertions(+), 348 deletions(-) create mode 100644 scintilla/win32/WinTypes.h diff --git a/scintilla/doc/ScintillaDoc.html b/scintilla/doc/ScintillaDoc.html index 77412022a..e54059624 100644 --- a/scintilla/doc/ScintillaDoc.html +++ b/scintilla/doc/ScintillaDoc.html @@ -128,7 +128,7 @@

Scintilla Documentation

-

Last edited 21 October 2021 ZL

+

Last edited 12 November 2021 NH

Scintilla 5 has moved the lexers from Scintilla into a new Lexilla project.
@@ -551,12 +551,12 @@

SCI_GETTEXT(position length, char *text NUL-terminated) → position
- This returns at most length-1 characters of text from the start of the document plus one - terminating 0 character. When length-1 is beyond document length, it returns document length. + This returns at most length characters of text from the start of the document plus one + terminating 0 character. When length is beyond document length, it returns document length. To collect all the text in a document, use SCI_GETLENGTH to get the number of characters in the document (nLen), allocate a character - buffer of length nLen+1 bytes, then call SCI_GETTEXT(nLen+1, char - *text). If the text argument is 0 then the length that should be allocated to store the + buffer of length nLen+1 bytes, then call SCI_GETTEXT(nLen, char + *text). If the text argument is NULL(0) then the length that should be allocated to store the entire document is returned. If you then save the text, you should use SCI_SETSAVEPOINT to mark the text as unmodified.

@@ -586,7 +586,7 @@

SCI_GETLINE(line line, char *text) → position
This fills the buffer defined by text with the contents of the nominated line (lines start at - 0). The buffer is not terminated by a 0 character. It is up to you to make sure that the buffer + 0). The buffer is not terminated by a NUL(0) character. It is up to you to make sure that the buffer is long enough for the text, use SCI_LINELENGTH(line line). The returned value is the number of characters copied to the buffer. The returned text includes any end of line @@ -1499,9 +1499,9 @@ struct Sci_TextToFind { href="#SCI_POSITIONFROMLINE">SCI_POSITIONFROMLINE(line).

SCI_GETSELTEXT(<unused>, char *text NUL-terminated) → position
- This copies the currently selected text and a terminating 0 byte to the text - buffer. The buffer size should be determined by calling with a NULL pointer for the text argument - SCI_GETSELTEXT(0,0). + This copies the currently selected text and a terminating NUL(0) byte to the text + buffer. The buffer size should be determined by calling with a NULL pointer for the text argument: + 1 + SCI_GETSELTEXT(0, NULL). This allows for rectangular and discontiguous selections as well as simple selections. See Multiple Selection for information on how multiple and rectangular selections and virtual space are copied.

@@ -1516,10 +1516,10 @@ struct Sci_TextToFind {

SCI_GETCURLINE(position length, char *text NUL-terminated) → position
This retrieves the text of the line containing the caret and returns the position within the line of the caret. Pass in char* text pointing at a buffer large enough to hold - the text you wish to retrieve and a terminating 0 character. + the text you wish to retrieve and a terminating NUL(0) character. Set length to the - length of the buffer which must be at least 1 to hold the terminating 0 character. - If the text argument is 0 then the length that should be allocated + length of the buffer not including the terminating NUL character. + If the text argument is NULL(0) then the length that should be allocated to store the entire current line is returned.

See also: SCI_GETSELTEXT, - + Windows   - + GTK/Linux   @@ -42,7 +42,7 @@ containing very few restrictions.

- Release 5.1.4 + Release 5.1.5

Source Code @@ -50,8 +50,8 @@ The source code package contains all of the source code for Scintilla but no binary executable code and is available in
    -
  • zip format (1.3M) commonly used on Windows
  • -
  • tgz format (1.2M) commonly used on Linux and compatible operating systems
  • +
  • zip format (1.3M) commonly used on Windows
  • +
  • tgz format (1.2M) commonly used on Linux and compatible operating systems
Instructions for building on both Windows and Linux are included in the readme file.

diff --git a/scintilla/doc/ScintillaHistory.html b/scintilla/doc/ScintillaHistory.html index fffc70be0..c4aec9cc9 100644 --- a/scintilla/doc/ScintillaHistory.html +++ b/scintilla/doc/ScintillaHistory.html @@ -564,9 +564,59 @@ Michael Neuroth Arne Scheffler + Jan DolinĂ¡r + Rowan Daniell

Releases

+

+ Release 5.1.5 +

+
    +
  • + Released 7 December 2021. +
  • +
  • + ScintillaEditPy, Python bindings for Qt using PySide, has been removed. + Scintilla was never updated for PySide 2 which was released in 2018 and PySide 1 + fell out of support making it difficult to use. + Tests that use ScintillaEditPy were removed. +
  • +
  • + When calling SCI_GETTEXT, SCI_GETSELTEXT, and SCI_GETCURLINE with a NULL buffer argument + to discover the length that should be allocated, do not include the terminating NUL in the returned value. + The value returned is 1 less than previous versions of Scintilla. + Applications should allocate a buffer 1 more than this to accommodate the NUL. + The wParam (length) argument to SCI_GETTEXT and SCI_GETCURLINE also omits the NUL. + This is more consistent with other APIs. +
  • +
  • + Fix assertion failure with autocompletion list when order is SC_ORDER_CUSTOM + or SC_ORDER_PERFORMSORT and the list is empty. + Bug #2294. +
  • +
  • + On Win32 prevent potential memory leaks for Korean language input. + Bug #2295. +
  • +
  • + On Cocoa set active state correctly at creation. + Bug #2299. +
  • +
  • + On macOS 12, fix bug where margin would not draw when scrolled. + Bug #2292. +
  • +
  • + On Cocoa, fix crash when drag image empty. + Bug #2300. +
  • +
  • + On GTK using Wayland, display autocompletion with window on a secondary monitor. + Bug #2296, + Bug #2261. +
  • +

Release 5.1.4

diff --git a/scintilla/doc/ScintillaRelated.html b/scintilla/doc/ScintillaRelated.html index 5cf38ebca..d9152d77d 100644 --- a/scintilla/doc/ScintillaRelated.html +++ b/scintilla/doc/ScintillaRelated.html @@ -127,6 +127,10 @@

Projects using Scintilla

+

+ x-studio + is a powerful and very lightweight developer IDE that supports Lua debugging. +

Adventure IDE is a general-purpose IDE and lightweight text editor for Windows. diff --git a/scintilla/doc/index.html b/scintilla/doc/index.html index 1b4df72be..5121dbf31 100644 --- a/scintilla/doc/index.html +++ b/scintilla/doc/index.html @@ -9,7 +9,7 @@ - +