diff -r c8b88e73b56f -r 61ca9619decb eric6/QScintilla/Editor.py --- a/eric6/QScintilla/Editor.py Tue Mar 16 17:29:42 2021 +0100 +++ b/eric6/QScintilla/Editor.py Wed Mar 17 19:54:32 2021 +0100 @@ -4714,6 +4714,9 @@ self.setVirtualSpaceOptions( Preferences.getEditor("VirtualSpaceOptions")) + # to avoid errors due to line endings by pasting + self.SendScintilla(QsciScintilla.SCI_SETPASTECONVERTENDINGS, True) + self.__markerMap.setEnabled(True) def __setEolMode(self): @@ -7723,6 +7726,13 @@ for t in templateNames]) return + elif cmd == QsciScintilla.SCI_DELETEBACK: + line, index = self.getCursorPosition() + text = self.text(line)[index - 1:index + 1] + matchingPairs = ['()', '[]', '{}', '<>', "''", '""'] + if text in matchingPairs: + self.delete() + super(Editor, self).editorCommand(cmd) def __applyTemplate(self, templateName, language):