384 @param line current line (integer) |
384 @param line current line (integer) |
385 @param col current position within line (integer) |
385 @param col current position within line (integer) |
386 @return flag indicating, if the cursor is inside a comment (boolean) |
386 @return flag indicating, if the cursor is inside a comment (boolean) |
387 """ |
387 """ |
388 txt = self.editor.text(line) |
388 txt = self.editor.text(line) |
|
389 if col == len(txt): |
|
390 col -= 1 |
389 while col >= 0: |
391 while col >= 0: |
390 if txt[col] == "#": |
392 if txt[col] == "#": |
391 return True |
393 return True |
392 col -= 1 |
394 col -= 1 |
393 return False |
395 return False |