MCPcopy Create free account
hub / github.com/JacquesLucke/code_autocomplete / set_cursor_position_vertical

Method set_cursor_position_vertical

text_block.py:268–274  ·  view source on GitHub ↗
(self, target_line, select = False)

Source from the content-addressed store, hash-verified

266 self.move_cursor_left(select)
267
268 def set_cursor_position_vertical(self, target_line, select = False):
269 move_function = self.move_cursor_up
270 if target_line > self.get_line_index(select):
271 move_function = self.move_cursor_down
272 move_amount = abs(self.current_line_index - target_line)
273 for i in range(move_amount):
274 move_function(select)
275
276 def get_character_index(self, select = False):
277 if select: return self.text_block.select_end_character

Callers 2

current_line_indexMethod · 0.95
set_cursor_positionMethod · 0.95

Calls 1

get_line_indexMethod · 0.95

Tested by

no test coverage detected