Home
last modified time | relevance | path

Searched refs:cursor (Results 1 – 8 of 8) sorted by relevance

/Held/src/utils/ui/
H A Devent.rs3 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()
[all …]
H A Duicore.rs15 buffer::EditBuffer, cursor::CursorCrtl, style::StyleManager, terminal::TermManager,
51 pub cursor: CursorCrtl, field
62 pub fn new(buf: Arc<EditBuffer>, cursor: CursorCrtl, setting: AppSetting) -> Self { in new()
65 cursor, in new()
90 let store_x = self.cursor.x(); in update_bottom_state_bar()
91 let store_y = self.cursor.y(); in update_bottom_state_bar()
93 self.cursor.set_prefix_mode(false); in update_bottom_state_bar()
97 self.cursor.move_to_row(cmd_y)?; in update_bottom_state_bar()
98 self.cursor.clear_current_line()?; in update_bottom_state_bar()
99 self.cursor in update_bottom_state_bar()
[all …]
/Held/src/utils/ui/mode/
H A Dmode.rs144 let y = ui.cursor.y() as usize; in jump_to_next_flag()
161 ui.cursor.move_to_row(new_y)?; in jump_to_next_flag()
162 ui.cursor.highlight(Some(y as u16))?; in jump_to_next_flag()
174 let y = ui.cursor.y() as usize; in jump_to_previous_flag()
189 ui.cursor.move_to_row(new_y)?; in jump_to_previous_flag()
190 ui.cursor.highlight(Some(y as u16))?; in jump_to_previous_flag()
199 let line = ui.buffer.get_line(ui.cursor.y()).data; in jump_to_first_char()
210 ui.cursor.move_to_columu(first_char)?; in jump_to_first_char()
225 let y = ui.cursor.y() as usize; in do_delete_on_d_clicked()
237 ui.cursor.move_to_columu(0)?; in do_delete_on_d_clicked()
[all …]
H A Dnormal.rs108 ui.cursor.store_pos(); in input_data()
145 ui.cursor.move_left(1)?; in backspace()
171 ui.cursor.move_to_columu(0)?; in exec_0_cmd()
182 let old_x = ui.cursor.x(); in exec_h_cmd()
194 ui.cursor.move_to_columu(new_x)?; in exec_h_cmd()
205 let old_y = ui.cursor.y(); in exec_j_cmd()
215 let new_x = if new_linesize < ui.cursor.x() { in exec_j_cmd()
219 ui.cursor.x() in exec_j_cmd()
221 ui.cursor.move_to(new_x, new_y)?; in exec_j_cmd()
222 ui.cursor.highlight(Some(old_y))?; in exec_j_cmd()
[all …]
H A Dcommon.rs16 let y = ui.cursor.y() as usize; in remove_line()
29 ui.cursor.move_to_columu(0)?; in remove_line()
40 let y = ui.cursor.y(); in remove_n_line()
51 let x = ui.cursor.x(); in remove_word()
52 let y = ui.cursor.y(); in remove_word()
70 let x = ui.cursor.x(); in move_to_line()
71 let y = ui.cursor.y(); in move_to_line()
74 ui.cursor.move_to(new_x, new_y)?; in move_to_line()
76 ui.cursor.highlight(Some(y))?; in move_to_line()
139 let y = ui.cursor.y() as usize; in move_to_nlines_of_screen()
[all …]
/Held/src/config/
H A Dlastline_cmd.rs136 ui.cursor.set_prefix_mode(true); in goto()
138 ui.cursor.restore_pos().unwrap(); in goto()
146 let lasty = ui.cursor.y(); in goto()
148 ui.cursor.move_to(x, y).unwrap(); in goto()
150 let pos = ui.cursor.store_tmp_pos(); in goto()
152 ui.cursor.restore_tmp_pos(pos).unwrap(); in goto()
154 ui.cursor.highlight(Some(lasty)).unwrap(); in goto()
156 ui.cursor.store_pos(); in goto()
167 .add_line_flags(ui.cursor.cmd_y() as usize - 1, LineState::FLAGED); in flag()
192 .add_line_flags(ui.cursor.cmd_y() as usize - 1, LineState::LOCKED) in lock()
[all …]
/Held/src/utils/
H A Dmod.rs2 pub mod cursor; module
H A Dcursor.rs8 cursor::{