parent
634c8b88f1
commit
00edb537b3
12
window.py
12
window.py
|
@ -565,6 +565,8 @@ class Window(object):
|
|||
return (p1, p2)
|
||||
|
||||
# deletion
|
||||
def delete_char(self, p):
|
||||
self.buffer.delete_char(p)
|
||||
def delete(self, p1, p2):
|
||||
self.buffer.delete(p1, p2)
|
||||
def delete_line(self):
|
||||
|
@ -629,6 +631,12 @@ class Window(object):
|
|||
else:
|
||||
self.buffer.overwrite_char(p, c)
|
||||
self.cursor = Point(p.x + 1, p.y)
|
||||
def replace_with_string(self, p1, p2, s):
|
||||
self.buffer.delete(p1, p2)
|
||||
self.insert_string(p1, s)
|
||||
def replace_with_lines(self, p1, p2, lines):
|
||||
self.buffer.delete(p1, p2)
|
||||
self.insert_lines(p1, lines)
|
||||
|
||||
# insertion
|
||||
def insert_string_at_cursor(self, s):
|
||||
|
@ -676,6 +684,10 @@ class Window(object):
|
|||
self.goto(p)
|
||||
|
||||
# highlighting tokens
|
||||
def get_token_list(self, y):
|
||||
return self.get_token_list_at_point(self.logical_cursor())
|
||||
def get_token_list_at_point(self, p):
|
||||
return self.get_highlighter().tokens[p.y]
|
||||
def get_token(self):
|
||||
return self.get_token_at_point(self.logical_cursor())
|
||||
def get_token2(self):
|
||||
|
|
Loading…
Reference in New Issue