Eventual bugs in plugins with Notepad++ v8.4.x
-
I’ve got some complains for the issues of some plugins with Notepad++ v8.4.x - these plugins in question have no problem with Notepad++ v8.3.3, so users think it’s a Notepad++ regression.
It’s due to updating Scintilla (one of components used by Notepad++) since v8.4.
The bug doesn’t come from Notepad++ : Scintilla has had changed the behaviour of its APISCI_GETTEXT
,SCI_GETSELTEXT
, andSCI_GETCURLINE
from version 4 to version 5, hence this problem:
https://c.tenor.com/D3crwiCIM48AAAAd/awkward-handshake-chess.gifFor plugins which use
SCI_GETTEXT
,SCI_GETSELTEXT
, andSCI_GETCURLINE
, the fix of this problem is to add 1 (character) to the length result of these 3 API, to make the plugin rework correctly under Notepad++ v8.4 and later versions.Related information:
- https://github.com/notepad-plus-plus/notepad-plus-plus/issues/11639#issuecomment-1121180121
- https://github.com/notepad-plus-plus/notepad-plus-plus/pull/11673
- https://github.com/notepad-plus-plus/notepad-plus-plus/issues/11661
- https://github.com/npp-plugins/mimetools/commit/e9a36d1c306a1dc03204032526ae23a3a03db218