eric6/QScintilla/MiniEditor.py

changeset 8222
5994b80b8760
parent 8218
7c09585bd960
child 8228
772103b14c18
diff -r 0572a215bd2f -r 5994b80b8760 eric6/QScintilla/MiniEditor.py
--- a/eric6/QScintilla/MiniEditor.py	Sun Apr 11 16:53:48 2021 +0200
+++ b/eric6/QScintilla/MiniEditor.py	Sun Apr 11 18:45:10 2021 +0200
@@ -129,11 +129,13 @@
         
         # See it is text to insert.
         if len(txt) and txt >= " ":
-            if self.hasSelectedText():
-                if txt in MiniScintilla.EncloseChars:
-                    encloseSelectedText(MiniScintilla.EncloseChars[txt])
-                    ev.accept()
-                    return
+            if (
+                self.hasSelectedText() and
+                txt in MiniScintilla.EncloseChars
+            ):
+                encloseSelectedText(MiniScintilla.EncloseChars[txt])
+                ev.accept()
+                return
             
             super().keyPressEvent(ev)
         else:

eric ide

mercurial