QScintilla/TypingCompleters/CompleterPython.py

changeset 85
2d80c7a3e773
parent 13
1af94a91f439
child 86
778f405e9411
equal deleted inserted replaced
84:277c4d00cfd6 85:2d80c7a3e773
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

eric ide

mercurial