--- a/eric6/QScintilla/MiniEditor.py Tue Mar 16 17:29:42 2021 +0100 +++ b/eric6/QScintilla/MiniEditor.py Wed Mar 17 19:54:32 2021 +0100 @@ -80,6 +80,21 @@ """ return self.mw.getFileName() + def editorCommand(self, cmd): + """ + Public method to perform a simple editor command. + + @param cmd the scintilla command to be performed (integer) + """ + if cmd == QsciScintilla.SCI_DELETEBACK: + line, index = self.getCursorPosition() + text = self.text(line)[index - 1:index + 1] + matchingPairs = ['()', '[]', '{}', '<>', "''", '""'] + if text in matchingPairs: + self.delete() + + super(MiniScintilla, self).editorCommand(cmd) + def keyPressEvent(self, ev): """ Protected method to handle the user input a key at a time. @@ -2986,6 +3001,10 @@ self.__textEdit.setVirtualSpaceOptions( Preferences.getEditor("VirtualSpaceOptions")) + + # to avoid errors due to line endings by pasting + self.__textEdit.SendScintilla( + QsciScintilla.SCI_SETPASTECONVERTENDINGS, True) def __setEolMode(self): """