Lines Matching refs:cursor

3 use crate::utils::{buffer::LineState, cursor::CursorCrtl, style::StyleManager};
16 if ui.cursor.x() == 0 { in backspace()
17 let y = ui.cursor.y(); in backspace()
21 if ui.cursor.y() == 0 { in backspace()
23 ui.cursor.move_to_nextline(1)?; in backspace()
26 ui.cursor.move_up(1)?; in backspace()
28 let y = ui.cursor.y(); in backspace()
34 let clear_y = if ui.cursor.y() == 0 { y + 1 } else { y }; in backspace()
37 ui.cursor.move_to_row(row)?; in backspace()
41 ui.cursor.set_prefix_mode(false); in backspace()
43 ui.cursor.move_to_columu(0)?; in backspace()
44 ui.cursor in backspace()
46 ui.cursor.set_prefix_mode(true); in backspace()
48 ui.cursor.clear_current_line()?; in backspace()
50 ui.cursor.move_to_row(y)?; in backspace()
51 ui.cursor.move_to_columu(linelen as u16)?; in backspace()
52 ui.cursor.highlight(Some(clear_y))?; in backspace()
60 let y = ui.cursor.y(); in backspace()
61 let x = ui.cursor.x(); in backspace()
74 ui.cursor.write(format!( in backspace()
79 ui.cursor.highlight(None)?; in backspace()
81 ui.cursor.move_to_columu(x - 1)?; in backspace()
86 if ui.cursor.y() == 0 { in up()
94 let linesize = ui.buffer.get_linesize(ui.cursor.y()); in up()
97 if linesize - 1 < ui.cursor.x() { in up()
98 ui.cursor.move_to_columu(linesize - 1)?; in up()
102 let linesize = ui.buffer.get_linesize(ui.cursor.y() - 1); in up()
108 ui.cursor.move_up(1)?; in up()
111 if linesize - 1 < ui.cursor.x() { in up()
112 ui.cursor.move_to_columu(linesize - 1)?; in up()
115 let last_y = ui.cursor.y() + 1; in up()
116 ui.cursor.highlight(Some(last_y))?; in up()
122 let mut linesize = ui.buffer.get_linesize(ui.cursor.y() + 1); in down()
128 if ui.cursor.y() == size.rows - UI_CMD_HEIGHT { in down()
131 if linesize < ui.cursor.x() { in down()
132 ui.cursor.move_to_columu(linesize - 1)?; in down()
140 ui.cursor.move_down(1)?; in down()
142 if linesize < ui.cursor.x() { in down()
143 ui.cursor.move_to_columu(linesize)?; in down()
145 let last_y = ui.cursor.y() - 1; in down()
146 ui.cursor.highlight(Some(last_y))?; in down()
151 ui.cursor.move_left(1)?; in left()
155 ui.cursor.move_right(1)?; in right()