You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the Bug
Trying to insert long dash, short dash, ellipsis, hard line break, non-breaking space, thin space, and thin non-breaking space when via the Insert menu does not work and causes an error popup. After the error popup, the editor cannot be used (cannot type in it and switching to another file clears the editor area) until you restart the program.
To Reproduce
Insert the characters mentioned above via the Insert menu.
Expected Behaviour
Insert the character and not break the editor.
Error Message
An unhandled error has been encountered
Please report this error by submitting an issue report on GitHub, providing a description and this error message. URL: <https://github.com/vkbo/novelWriter/issues>.
Environment
Version: 0.12.0, OS: win32 (10.0.18363), Python: 3.8.5 (0x30805f0), Qt: 5.15.0, PyQt: 5.15.0
Error Type
TypeError: arguments did not match any overloaded call: insertText(self, str): argument 1 has unexpected type 'tuple' insertText(self, str, QTextCharFormat): argument 1 has unexpected type 'tuple'
Traceback
File "D:\Users\User\Documents\novelWriter\nw\gui\mainmenu.py", line 516, in
self.aInsEllipsis.triggered.connect(lambda: self._docInsert(nwDocInsert.ELLIPSIS))
File "D:\Users\User\Documents\novelWriter\nw\gui\doceditor.py", line 625, in insertText
theCursor.insertText(theText)
Additional Context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered:
Thanks. Fixing it now. This one was caused by one of the weirdest pitfalls in the Python language: if you leave a comma after a variable, there's no error. Instead the variable becomes a tuple. It was caused by the rewrite of the insert function from using a dictionary, where each statement ends in a comma, to a series of if-elsifs.
vkbo
linked a pull request
Aug 16, 2020
that will
close
this issue
Describe the Bug
Trying to insert long dash, short dash, ellipsis, hard line break, non-breaking space, thin space, and thin non-breaking space when via the Insert menu does not work and causes an error popup. After the error popup, the editor cannot be used (cannot type in it and switching to another file clears the editor area) until you restart the program.
To Reproduce
Insert the characters mentioned above via the Insert menu.
Expected Behaviour
Insert the character and not break the editor.
Error Message
Additional Context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: