Lines Matching refs:first
65 first = text.index("sel.first")
67 first = None
72 first = first or text.index("insert")
73 last = last or first
74 self.show_hit(first, last)
137 starts at the first occurrence after the current selection;
138 if wrap is set, the replacement starts at the first line.
158 first = last = None
170 first = "%d.%d" % (line, i)
175 text.mark_set("insert", first)
176 if first != last:
177 text.delete(first, last)
179 text.insert(first, new, self.insert_tags)
183 if first and last:
184 self.show_hit(first, last)
201 first = "%d.%d" % (line, i)
203 self.show_hit(first, last)
214 first = pos = text.index("sel.first")
219 first = last = pos = text.index("insert")
228 text.mark_set("insert", first)
231 text.delete(first, last)
233 text.insert(first, new, self.insert_tags)
235 self.show_hit(first, text.index("insert"))
239 def show_hit(self, first, last):
240 """Highlight text between first and last indices.
247 tag being added first, so the colors in the 'sel'
251 text.mark_set("insert", first)
253 text.tag_add("sel", first, last)
255 if first == last:
256 text.tag_add("hit", first)
258 text.tag_add("hit", first, last)