Fixing bug preventing copy/cut/paste using shortcuts on CFileEditor text editors
authorlaurent
Wed, 16 Nov 2011 23:30:17 +0100
changeset 637 c19557ec2c5a
parent 636 35c59bfc54f2
child 638 865c7c60a1f3
Fixing bug preventing copy/cut/paste using shortcuts on CFileEditor text editors
plugins/c_ext/CFileEditor.py
--- a/plugins/c_ext/CFileEditor.py	Wed Nov 16 23:28:42 2011 +0100
+++ b/plugins/c_ext/CFileEditor.py	Wed Nov 16 23:30:17 2011 +0100
@@ -429,6 +429,25 @@
 
         return line
 
+    def Cut(self):
+        self.ResetBuffer()
+        self.DisableEvents = True
+        self.CmdKeyExecute(wx.stc.STC_CMD_CUT)
+        self.DisableEvents = False
+        self.RefreshModel()
+        self.RefreshBuffer()
+    
+    def Copy(self):
+        self.CmdKeyExecute(wx.stc.STC_CMD_COPY)
+    
+    def Paste(self):
+        self.ResetBuffer()
+        self.DisableEvents = True
+        self.CmdKeyExecute(wx.stc.STC_CMD_PASTE)
+        self.DisableEvents = False
+        self.RefreshModel()
+        self.RefreshBuffer()
+
 
 #-------------------------------------------------------------------------------
 #                         Helper for VariablesGrid values