Home
last modified time | relevance | path

Searched refs:buffer (Results 1 – 11 of 11) sorted by relevance

/Held/src/utils/ui/mode/
H A Dcommon.rs17 let old_line_count = ui.buffer.line_count(); in remove_line()
18 let old_offset = ui.buffer.offset(); in remove_line()
21 ui.buffer.delete_line(y + ui.buffer.offset() as usize); in remove_line()
30 ui.buffer.insert_char('\n' as u8, 0, 0); in remove_line()
39 let linecount = ui.buffer.line_count() as u16; in remove_n_line()
53 let next_word_pos = ui.buffer.search_nextw_begin(x, y); in remove_word()
54 let linesize = ui.buffer.get_linesize(y); in remove_word()
58 ui.buffer.remove_str(x, y, next_word_pos - x as usize); in remove_word()
62 ui.buffer.delete_line(y.into()); in remove_word()
72 let new_y = ui.buffer.goto_line(line as usize); in move_to_line()
[all …]
H A Dmode.rs7 use crate::utils::buffer::LineState;
143 let offset = ui.buffer.offset(); in jump_to_next_flag()
147 if start_line_number >= ui.buffer.line_count() { in jump_to_next_flag()
151 let content = &ui.buffer.all_buffer()[start_line_number..]; in jump_to_next_flag()
159 let new_y = ui.buffer.goto_line(line_number); in jump_to_next_flag()
173 let offset = ui.buffer.offset(); in jump_to_previous_flag()
180 let content = &ui.buffer.all_buffer()[0..end_linenumber]; in jump_to_previous_flag()
187 let new_y = ui.buffer.goto_line(idx.unwrap()); in jump_to_previous_flag()
199 let line = ui.buffer.get_line(ui.cursor.y()).data; in jump_to_first_char()
226 let old_line_count = ui.buffer.line_count(); in do_delete_on_d_clicked()
[all …]
H A Dnormal.rs206 let old_abs_y = old_y + ui.buffer.offset() as u16; in exec_j_cmd()
209 Some(count) => count.min(ui.buffer.line_count() - old_abs_y as usize - 1), in exec_j_cmd()
212 let old_offset = ui.buffer.offset(); in exec_j_cmd()
213 let new_y = ui.buffer.goto_line(old_abs_y as usize + exec_count); in exec_j_cmd()
214 let new_linesize = ui.buffer.get_linesize(new_y); in exec_j_cmd()
224 if ui.buffer.offset() != old_offset { in exec_j_cmd()
238 let old_abs_y = old_y + ui.buffer.offset() as u16; in exec_k_cmd()
241 Some(count) => count.min(old_y as usize + ui.buffer.offset()), in exec_k_cmd()
251 let old_offset = ui.buffer.offset(); in exec_k_cmd()
252 let new_y = ui.buffer.goto_line(to_line); in exec_k_cmd()
[all …]
/Held/src/config/
H A Dlastline_cmd.rs6 buffer::LineState,
121 let buf_line_max = ui.buffer.line_count() as u16; in goto()
124 let mut x = x.unwrap_or(1).min(ui.buffer.get_linesize(y)); in goto()
147 let y = ui.buffer.goto_line(y as usize); in goto()
166 ui.buffer in flag()
178 ui.buffer.add_line_flags(line - 1, LineState::FLAGED); in flag()
191 ui.buffer in lock()
204 ui.buffer.add_line_flags(line - 1, LineState::LOCKED); in lock()
219 ui.buffer in unflag()
232 ui.buffer.remove_line_flags(line - 1, LineState::FLAGED); in unflag()
[all …]
/Held/src/utils/ui/
H A Devent.rs3 use crate::utils::{buffer::LineState, cursor::CursorCrtl, style::StyleManager};
18 let (merged, linelen) = ui.buffer.merge_line(y); in backspace()
63 let line = ui.buffer.get_line(y); in backspace()
70 ui.buffer.remove_char(x - 1, y); in backspace()
72 let line = ui.buffer.get_line(y); in backspace()
87 if ui.buffer.offset() == 0 { in up()
94 let linesize = ui.buffer.get_linesize(ui.cursor.y()); in up()
102 let linesize = ui.buffer.get_linesize(ui.cursor.y() - 1); in up()
122 let mut linesize = ui.buffer.get_linesize(ui.cursor.y() + 1); in down()
H A Duicore.rs15 buffer::EditBuffer, cursor::CursorCrtl, style::StyleManager, terminal::TermManager,
50 pub buffer: Arc<EditBuffer>, field
64 buffer: buf, in new()
102 let (buf_x, buf_y) = (store_x, store_y + 1 + self.buffer.offset() as u16); in update_bottom_state_bar()
137 let content = self.buffer.get_content(y as usize, count); in render_content()
182 let offset = self.buffer.offset(); in scroll_up()
185 let linecount = self.buffer.line_count(); in scroll_up()
189 self.buffer.set_offset(offset + count as usize); in scroll_up()
212 let offset = self.buffer.offset(); in scroll_down()
217 self.buffer.set_offset(offset - count as usize); in scroll_down()
/Held/src/
H A Dapp.rs53 let buffer = &self.ui.core.lock().unwrap().buffer; in run() localVariable
54 self.file_manager.store(buffer)? in run()
/Held/src/utils/
H A Dbuffer.rs376 let mut buffer = self.buf.write().unwrap(); in delete_lines() localVariable
379 let line = buffer.get(index).unwrap(); in delete_lines()
383 buffer.remove(index); in delete_lines()
392 let mut buffer = self.buf.write().unwrap(); in delete_line() localVariable
393 let line = buffer.get(y); in delete_line()
403 buffer.remove(y); in delete_line()
409 let mut buffer = self.buf.write().unwrap(); in delete_until_line_beg() localVariable
410 let line = buffer.get_mut(y).unwrap(); in delete_until_line_beg()
422 let mut buffer = self.buf.write().unwrap(); in delete_until_endl() localVariable
423 let line = buffer.get_mut(y).unwrap(); in delete_until_endl()
H A Dmod.rs1 pub mod buffer; module
H A Dfile.rs6 use super::buffer::EditBuffer;
H A Dcursor.rs18 buffer::{EditBuffer, LineBuffer},