Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

editor.getTextRange crash notepad++ #224

Closed
MaDill opened this issue Feb 17, 2022 · 3 comments
Closed

editor.getTextRange crash notepad++ #224

MaDill opened this issue Feb 17, 2022 · 3 comments
Milestone

Comments

@MaDill
Copy link

MaDill commented Feb 17, 2022

When I use getTextRange, notepad++ just crash and is closed without a message or error.

Configuration:

Notepad++ v8.3.1   (64-bit)
Build time : Feb 13 2022 - 15:41:12
Path : C:\_PortablePrograms\Notepad++\notepad++.exe
Command Line : 
Admin mode : OFF
Local Conf mode : ON
Cloud Config : OFF
OS Name : Windows 10 Pro (64-bit) 
OS Version : 2009
OS Build : 19044.1466
Current ANSI codepage : 1252
Plugins : DSpellCheck.dll HexEditor.dll mimeTools.dll NppConverter.dll NppExec.dll NppExport.dll PythonScript.dll XMLTools.dll 

PythonScript Version 1.5.4.0 64bit

Testfile:

test1
test2as
test 3
test4
teSt5
tast6
tes17
test8
tes9
test10

Now I mark the word "test2as".

Console commands:

>>> editor.getSelText()
'test2as'
>>> editor.getSelectionStart()
7
>>> editor.getSelectionEnd()
14

When I now execute getTextRange in the console the console turns solid grey and after a few seconds notepad++ close itself.

>>> editor.getTextRange(7, 14)

@alankilborn
Copy link

Notepad++ 8.3 and above added huge file support and because of that plugins that use SCI_GETTEXTRANGE need to be rebuilt and a new version of the plugin released.

@chcg
Copy link
Collaborator

chcg commented Feb 17, 2022

@alankilborn See https://github.com/bruderstein/PythonScript/releases/tag/v3.0.12 should already address this issue. I'm currently at it to port back the changes to the python2 branch as python3 has the drawback that ansi files are not supported yet.

chcg added a commit that referenced this issue Feb 17, 2022
expected to fix:
- editor.getTextRange crash notepad++ #224
- findText do not find text #223
- Notepad++ 8.3 builds change Sci_position leading to crash #218
@chcg chcg added this to the v2.0 milestone Feb 17, 2022
@chcg
Copy link
Collaborator

chcg commented Feb 17, 2022

Fixed with https://github.com/bruderstein/PythonScript/releases/tag/v2.0.0 and
https://github.com/bruderstein/PythonScript/releases/tag/v3.0.11

@chcg chcg closed this as completed Feb 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants