eric7/QScintilla/Editor.py

branch
eric7
changeset 8713
c2a124c2ecbb
parent 8710
d34014eaa7db
child 8761
f05818ae6431
--- a/eric7/QScintilla/Editor.py	Sat Oct 23 09:16:10 2021 +0200
+++ b/eric7/QScintilla/Editor.py	Sat Oct 23 12:19:47 2021 +0200
@@ -208,6 +208,8 @@
         self.setAttribute(Qt.WidgetAttribute.WA_KeyCompression)
         self.setUtf8(True)
         
+        self.enableMultiCursorSupport()
+        
         self.dbs = dbs
         self.taskViewer = tv
         self.__setFileName(fn)
@@ -7194,6 +7196,16 @@
         elif event.button() == Qt.MouseButton.XButton2:
             self.redo()
             event.accept()
+        elif (
+            event.button() == Qt.MouseButton.LeftButton and
+            bool(event.modifiers() & (
+                Qt.KeyboardModifier.MetaModifier |
+                Qt.KeyboardModifier.AltModifier
+            ))
+        ):
+            line, index = self.lineIndexFromPoint(event.pos())
+            self.addCursor(line, index)
+            event.accept()
         else:
             self.vm.eventFilter(self, event)
             super().mousePressEvent(event)
@@ -8472,6 +8484,8 @@
         ):
             evt.accept()
             self.__mouseClickHandlers[key][1](self)
+        else:
+            super().mouseReleaseEvent(evt)
     
     def setMouseClickHandler(self, name, modifiers, button, function):
         """

eric ide

mercurial