158 @param line current line (integer) |
158 @param line current line (integer) |
159 @param col current position within line (integer) |
159 @param col current position within line (integer) |
160 @return flag indicating, if the cursor is inside a comment (boolean) |
160 @return flag indicating, if the cursor is inside a comment (boolean) |
161 """ |
161 """ |
162 txt = self.editor.text(line) |
162 txt = self.editor.text(line) |
|
163 if col == len(txt): |
|
164 col -= 1 |
163 while col >= 0: |
165 while col >= 0: |
164 if txt[col] == "#": |
166 if txt[col] == "#": |
165 return True |
167 return True |
166 col -= 1 |
168 col -= 1 |
167 return False |
169 return False |