Skip to content

Commit b6c6bef

Browse files
authored
Inherit from appModule for Notepad++ included in NVDA to fix crashes in 64-bit version of NPP 8.3 and later. (#32)
1 parent a74c1bb commit b6c6bef

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

addon/appModules/notepad++/editWindow.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,11 @@
77
import weakref
88
import addonHandler
99
import config
10-
from NVDAObjects.behaviors import EditableTextWithAutoSelectDetection, EditableTextWithSuggestions
11-
from editableText import EditableText
12-
import api
10+
try:
11+
from nvdaBuiltin.appModules.notepadPlusPlus import NppEdit as EditWindowBaseCls
12+
except ImportError:
13+
from NVDAObjects.behaviors import EditableTextWithAutoSelectDetection as EditWindowBaseCls
14+
from NVDAObjects.behaviors import EditableTextWithSuggestions
1315
from queueHandler import registerGeneratorObject
1416
import speech
1517
import textInfos
@@ -19,13 +21,11 @@
1921
import scriptHandler
2022
import sys
2123
import os
22-
import tempfile
23-
from threading import Timer
24-
import re
2524

2625
addonHandler.initTranslation()
2726

28-
class EditWindow(EditableTextWithAutoSelectDetection, EditableTextWithSuggestions):
27+
28+
class EditWindow(EditWindowBaseCls, EditableTextWithSuggestions):
2929
"""An edit window that implements all of the scripts on the edit field for Notepad++"""
3030

3131

0 commit comments

Comments
 (0)