We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a688146 commit a28e9dfCopy full SHA for a28e9df
preditor/gui/workboxwidget.py
@@ -150,7 +150,12 @@ def __save__(self):
150
151
def __selected_text__(self, start_of_line=False, selectText=False):
152
line, s, end, e = self.getSelection()
153
- if line == -1:
+
154
+ # Sometime self.getSelection returns values that equate to a non-existent
155
+ # selection, ie start and end are the same, so let's process it as if there is
156
+ # no selection
157
+ selectionIsEmpty = line == end and s == e
158
+ if line == -1 or selectionIsEmpty:
159
# Nothing is selected, return the current line of text
160
line, index = self.getCursorPosition()
161
txt = self.text(line)
0 commit comments