QScintilla/Editor.py

changeset 1588
dccffd13be8d
parent 1566
0cb791cc631a
child 1723
6e690a8f5971
equal deleted inserted replaced
1587:714a3627a089 1588:dccffd13be8d
2936 else: 2936 else:
2937 # determine the start of the comment block 2937 # determine the start of the comment block
2938 begline = line 2938 begline = line
2939 while begline > 0 and \ 2939 while begline > 0 and \
2940 self.text(begline - 1).strip().startswith(commentStr): 2940 self.text(begline - 1).strip().startswith(commentStr):
2941 begline -= 1 2941 begline -= 1
2942 # determine the end of the comment block 2942 # determine the end of the comment block
2943 endline = line 2943 endline = line
2944 lines = self.lines() 2944 lines = self.lines()
2945 while endline < lines and \ 2945 while endline < lines and \
2946 self.text(endline + 1).strip().startswith(commentStr): 2946 self.text(endline + 1).strip().startswith(commentStr):
2947 endline += 1 2947 endline += 1
2948 2948
2949 self.setSelection(begline, 0, endline, self.lineLength(endline)) 2949 self.setSelection(begline, 0, endline, self.lineLength(endline))
2950 self.uncommentLineOrSelection() 2950 self.uncommentLineOrSelection()
2951 2951
2952 # reset the cursor 2952 # reset the cursor
5413 Protected method to handle wheel events. 5413 Protected method to handle wheel events.
5414 5414
5415 @param evt reference to the wheel event (QWheelEvent) 5415 @param evt reference to the wheel event (QWheelEvent)
5416 """ 5416 """
5417 if evt.modifiers() & Qt.ControlModifier: 5417 if evt.modifiers() & Qt.ControlModifier:
5418 if evt.delta()< 0: 5418 if evt.delta() < 0:
5419 self.zoomOut() 5419 self.zoomOut()
5420 else: 5420 else:
5421 self.zoomIn() 5421 self.zoomIn()
5422 evt.accept() 5422 evt.accept()
5423 return 5423 return

eric ide

mercurial