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 |