eric6/QScintilla/MiniEditor.py

changeset 8235
78e6d29eb773
parent 8228
772103b14c18
child 8243
cc717c2ae956
equal deleted inserted replaced
8234:fcb6b4b96274 8235:78e6d29eb773
111 @param encString string to use to enclose the selection 111 @param encString string to use to enclose the selection
112 (one or two characters) 112 (one or two characters)
113 @type str 113 @type str
114 """ 114 """
115 startChar = encString[0] 115 startChar = encString[0]
116 if len(encString) == 2: 116 endChar = encString[1] if len(encString) == 2 else startChar
117 endChar = encString[1]
118 else:
119 endChar = startChar
120 117
121 sline, sindex, eline, eindex = self.getSelection() 118 sline, sindex, eline, eindex = self.getSelection()
122 replaceText = startChar + self.selectedText() + endChar 119 replaceText = startChar + self.selectedText() + endChar
123 self.beginUndoAction() 120 self.beginUndoAction()
124 self.replaceSelectedText(replaceText) 121 self.replaceSelectedText(replaceText)

eric ide

mercurial