Home
last modified time | relevance | path

Searched refs:u16 (Results 1 – 9 of 9) sorted by relevance

/Held/src/utils/ui/mode/
H A Dcommon.rs22 ui.render_content(y as u16, count.max(1))?; in remove_line()
38 fn remove_n_line(&self, ui: &mut MutexGuard<UiCore>, n: u16) -> io::Result<()> { in remove_n_line()
39 let linecount = ui.buffer.line_count() as u16; in remove_n_line()
69 fn move_to_line(&self, ui: &mut MutexGuard<UiCore>, line: u16) -> io::Result<()> { in move_to_line()
73 let new_x = x.min(ui.buffer.get_linesize(new_y)) as u16; in move_to_line()
81 fn locate_prevw_begin(&self, ui: &mut MutexGuard<UiCore>, x: u16, abs_y: u16) -> (u16, u16) { in locate_prevw_begin() argument
90 return (prev_word_pos as u16, last_y); in locate_prevw_begin()
95 return (prev_word_pos as u16, abs_y); in locate_prevw_begin()
99 fn locate_nextw_ending(&self, ui: &mut MutexGuard<UiCore>, x: u16, abs_y: u16) -> (u16, u16) { in locate_nextw_ending() argument
104 if abs_y < ui.buffer.line_count() as u16 - 1 { in locate_nextw_ending()
[all …]
H A Dnormal.rs32 pub start_pos: Option<(u16, u16)>,
33 pub end_pos: Option<(u16, u16)>,
193 let new_x = old_x - exec_count as u16; in exec_h_cmd()
206 let old_abs_y = old_y + ui.buffer.offset() as u16; in exec_j_cmd()
238 let old_abs_y = old_y + ui.buffer.offset() as u16; in exec_k_cmd()
283 if old_x == linesize as u16 - 1 { in exec_l_cmd()
290 let new_x = old_x + exec_count as u16; in exec_l_cmd()
426 Some(count) => count as u16, in exec_d_cmd()
456 let mut pos = (ui.cursor.x(), ui.cursor.y() + ui.buffer.offset() as u16); in on_w_clicked()
506 self.move_to_line(ui, lineidx as u16)?; in exec_G_cmd()
[all …]
H A Dmode.rs162 ui.cursor.highlight(Some(y as u16))?; in jump_to_next_flag()
190 ui.cursor.highlight(Some(y as u16))?; in jump_to_previous_flag()
230 ui.render_content(y as u16, count.max(1))?; in do_delete_on_d_clicked()
249 ui.render_content(y as u16, 1)?; in do_delete_on_d_clicked()
260 ui.render_content(y as u16, 1)?; in do_delete_on_d_clicked()
317 ui.cursor.move_to_columu(pos as u16)?; in jump_to_next_word()
318 } else if y + 1 < ui.buffer.line_count() as u16 { in jump_to_next_word()
324 ui.cursor.move_to_columu(linesize as u16 - 1)?; in jump_to_next_word()
337 if y < ui.buffer.line_count() as u16 - 1 { in jump_to_nextw_ending()
338 let next_end_pos = ui.buffer.search_nextw_end(0, y + 1) as u16; in jump_to_nextw_ending()
[all …]
/Held/src/utils/
H A Dcursor.rs30 pub fn move_to(x: u16, y: u16) -> io::Result<()> { in move_to() argument
35 pub fn move_to_nextline(lines: u16) -> io::Result<()> { in move_to_nextline()
40 pub fn move_to_previous_line(lines: u16) -> io::Result<()> { in move_to_previous_line()
45 pub fn move_to_columu(col: u16) -> io::Result<()> { in move_to_columu()
50 pub fn move_to_row(row: u16) -> io::Result<()> { in move_to_row()
55 pub fn move_up(count: u16) -> io::Result<()> { in move_up()
60 pub fn move_down(count: u16) -> io::Result<()> { in move_down()
65 pub fn move_left(count: u16) -> io::Result<()> { in move_left()
70 pub fn move_right(count: u16) -> io::Result<()> { in move_right()
97 x: u16,
[all …]
H A Dbuffer.rs147 pub fn get_linesize(&self, line: u16) -> u16 { in get_linesize() argument
156 line.data.len() as u16 in get_linesize()
159 pub fn get_linesize_abs(&self, line: u16) -> u16 { in get_linesize_abs() argument
168 line.data.len() as u16 in get_linesize_abs()
172 pub fn remove_char(&self, x: u16, y: u16) { in remove_char() argument
182 pub fn remove_str(&self, x: u16, y: u16, n: usize) { in remove_str() argument
193 pub fn get_line(&self, line: u16) -> LineBuffer { in get_line()
211 pub fn merge_line(&self, line: u16) -> (bool, usize) { in merge_line()
242 pub fn insert_char(&self, ch: u8, x: u16, y: u16) { in insert_char() argument
260 pub fn input_enter(&self, x: u16, y: u16) { in input_enter() argument
[all …]
H A Dterminal.rs37 pub fn scroll_up(lines: u16) -> io::Result<()> { in scroll_up()
42 pub fn scroll_down(lines: u16) -> io::Result<()> { in scroll_down()
/Held/src/utils/ui/
H A Duicore.rs44 pub cols: u16,
45 pub rows: u16,
102 let (buf_x, buf_y) = (store_x, store_y + 1 + self.buffer.offset() as u16); in update_bottom_state_bar()
104 let len = index_info.len() as u16; in update_bottom_state_bar()
126 pub fn render_content(&mut self, mut y: u16, mut count: usize) -> io::Result<usize> { in render_content() argument
131 if y + count as u16 > content_winsize.rows { in render_content()
158 .move_to(num_len as u16 + 2 + CursorCrtl::PREFIX_COL, y)?; in render_content()
176 pub fn scroll_up(&mut self, mut count: u16) -> io::Result<()> { in scroll_up()
187 count = linecount as u16 - offset as u16 - winsize.rows; in scroll_up()
208 pub fn scroll_down(&mut self, mut count: u16) -> io::Result<()> { in scroll_down()
[all …]
H A Devent.rs35 let row = clear_y + ret as u16; in backspace()
51 ui.cursor.move_to_columu(linelen as u16)?; in backspace()
/Held/src/config/
H A Dlastline_cmd.rs108 (u16::from_str_radix(a[0], 10), Ok(1)) in goto()
110 (u16::from_str_radix(a[0], 10), u16::from_str_radix(a[1], 10)) in goto()
121 let buf_line_max = ui.buffer.line_count() as u16; in goto()