QScintilla/TypingCompleters/CompleterRuby.py

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

eric ide

mercurial