pub struct Zle {Show 36 fields
pub zleline: Vec<char>,
pub zlecs: usize,
pub zlell: usize,
pub mark: usize,
pub insmode: bool,
pub done: bool,
pub lastchar: i32,
pub lastchar_wide: i32,
pub lastchar_wide_valid: bool,
pub lbindk: Option<Thingy>,
pub bindk: Option<Thingy>,
pub lastcmd: WidgetFlags,
pub zmod: Modifier,
pub prefixflag: bool,
pub zle_recursive: i32,
pub zlereadflags: ZleReadFlags,
pub zlecontext: ZleContext,
pub statusline: Option<String>,
pub stackhist: i32,
pub stackcs: usize,
pub vistartchange: u64,
pub undo_stack: Vec<Change>,
pub changeno: u64,
pub keytimeout: u64,
pub watch_fds: Vec<WatchFd>,
pub keymaps: KeymapManager,
pub compwidget: Option<Widget>,
pub incompctlfunc: bool,
pub hascompmod: bool,
pub resetneeded: bool,
pub vibuf: [Vec<char>; 36],
pub killring: VecDeque<Vec<char>>,
pub killringmax: usize,
pub yanklast: bool,
pub neg_arg: bool,
pub mult: i32,
/* private fields */
}Expand description
The main ZLE state
Fields§
§zleline: Vec<char>The input line assembled so far
zlecs: usizeCursor position
zlell: usizeLine length
mark: usizeMark position
insmode: boolInsert mode (true) or overwrite mode (false)
done: boolDone editing flag
lastchar: i32Last character pressed
lastchar_wide: i32Last character as wide char (always used in Rust)
lastchar_wide_valid: boolWhether lastchar_wide is valid
lbindk: Option<Thingy>Binding for the previous key
bindk: Option<Thingy>Binding for this key
lastcmd: WidgetFlagsFlags associated with last command
zmod: ModifierCurrent modifier status
prefixflag: boolPrefix command flag
zle_recursive: i32Recursive edit depth
zlereadflags: ZleReadFlagsRead flags
zlecontext: ZleContextContext
statusline: Option<String>Status line
stackhist: i32History position for buffer stack
stackcs: usizeCursor position for buffer stack
vistartchange: u64Vi start change position in undo stack
undo_stack: Vec<Change>Undo stack
changeno: u64Current change number
keytimeout: u64Key timeout in 100ths of a second
watch_fds: Vec<WatchFd>Watch file descriptors
keymaps: KeymapManagerKeymap manager
compwidget: Option<Widget>Completion widget
incompctlfunc: boolIn completion function flag
hascompmod: boolCompletion module loaded flag
resetneeded: boolNeeds refresh
vibuf: [Vec<char>; 36]Vi cut buffers (0-35: 0-9, a-z)
killring: VecDeque<Vec<char>>Kill ring
killringmax: usizeKill ring max size
yanklast: boolLast command was a yank (for yank-pop)
neg_arg: boolNegative argument flag
mult: i32Multiplier for commands
Implementations§
Source§impl Zle
impl Zle
Sourcepub fn init_history(&mut self, max_size: usize)
pub fn init_history(&mut self, max_size: usize)
Initialize history for ZLE
Sourcepub fn history_up(&mut self, hist: &mut History)
pub fn history_up(&mut self, hist: &mut History)
Go to previous history entry
Sourcepub fn history_down(&mut self, hist: &mut History)
pub fn history_down(&mut self, hist: &mut History)
Go to next history entry
Sourcepub fn history_isearch_backward(&mut self, hist: &mut History)
pub fn history_isearch_backward(&mut self, hist: &mut History)
Incremental search backward
Sourcepub fn history_isearch_forward(&mut self, hist: &mut History)
pub fn history_isearch_forward(&mut self, hist: &mut History)
Incremental search forward
Sourcepub fn history_search_prefix(&mut self, hist: &mut History)
pub fn history_search_prefix(&mut self, hist: &mut History)
Search history for prefix
Sourcepub fn beginning_of_history(&mut self, hist: &mut History)
pub fn beginning_of_history(&mut self, hist: &mut History)
Beginning of history - go to first entry Port of beginningofhistory() from zle_hist.c
Sourcepub fn end_of_history(&mut self, hist: &mut History)
pub fn end_of_history(&mut self, hist: &mut History)
End of history - go to last entry (current line) Port of endofhistory() from zle_hist.c
Sourcepub fn up_line_or_history(&mut self, hist: &mut History)
pub fn up_line_or_history(&mut self, hist: &mut History)
Up line or history - move up in multi-line buffer or go to previous history Port of uplineorhistory() from zle_hist.c
Sourcepub fn down_line_or_history(&mut self, hist: &mut History)
pub fn down_line_or_history(&mut self, hist: &mut History)
Down line or history - move down in multi-line buffer or go to next history Port of downlineorhistory() from zle_hist.c
Sourcepub fn history_search_backward(&mut self, hist: &mut History)
pub fn history_search_backward(&mut self, hist: &mut History)
History search backward - search for entries starting with current prefix Port of historysearchbackward() from zle_hist.c
Sourcepub fn history_search_forward(&mut self, hist: &mut History)
pub fn history_search_forward(&mut self, hist: &mut History)
History search forward - search for entries starting with current prefix Port of historysearchforward() from zle_hist.c
Sourcepub fn insert_last_word(&mut self, hist: &History)
pub fn insert_last_word(&mut self, hist: &History)
Insert last word from previous history entry Port of insertlastword() from zle_hist.c
Sourcepub fn push_line(&mut self)
pub fn push_line(&mut self)
Push current line to buffer stack Port of pushline() from zle_hist.c
Sourcepub fn accept_line_and_down_history(
&mut self,
hist: &mut History,
) -> Option<String>
pub fn accept_line_and_down_history( &mut self, hist: &mut History, ) -> Option<String>
Accept line and go to next history (for walking through history executing each) Port of acceptlineanddownhistory() from zle_hist.c
Sourcepub fn vi_fetch_history(&mut self, hist: &mut History, num: usize)
pub fn vi_fetch_history(&mut self, hist: &mut History, num: usize)
Vi fetch history - go to specific history entry by number Port of vifetchhistory() from zle_hist.c
Sourcepub fn vi_history_search_backward(&mut self, hist: &mut History, pattern: &str)
pub fn vi_history_search_backward(&mut self, hist: &mut History, pattern: &str)
Vi history search backward Port of vihistorysearchbackward() from zle_hist.c
Sourcepub fn vi_history_search_forward(&mut self, hist: &mut History, pattern: &str)
pub fn vi_history_search_forward(&mut self, hist: &mut History, pattern: &str)
Vi history search forward Port of vihistorysearchforward() from zle_hist.c
Sourcepub fn vi_repeat_search(&mut self, hist: &mut History)
pub fn vi_repeat_search(&mut self, hist: &mut History)
Vi repeat search Port of virepeatsearch() from zle_hist.c
Sourcepub fn vi_rev_repeat_search(&mut self, hist: &mut History)
pub fn vi_rev_repeat_search(&mut self, hist: &mut History)
Vi reverse repeat search Port of virevrepeatsearch() from zle_hist.c
Sourcepub fn set_local_history(&mut self, _local: bool)
pub fn set_local_history(&mut self, _local: bool)
Set local history mode Port of setlocalhistory() from zle_hist.c
Sourcepub fn remember_edits(&mut self, hist: &mut History)
pub fn remember_edits(&mut self, hist: &mut History)
Remember current line edits for history navigation Port of remember_edits() from zle_hist.c
Sourcepub fn forget_edits(&mut self, _hist: &mut History)
pub fn forget_edits(&mut self, _hist: &mut History)
Forget remembered edits Port of forget_edits() from zle_hist.c
Source§impl Zle
impl Zle
pub fn new() -> Zle
Sourcepub fn ungetbytes(&mut self, s: &[u8])
pub fn ungetbytes(&mut self, s: &[u8])
Unget multiple bytes
Sourcepub fn raw_getbyte(&mut self, do_keytmout: bool) -> Option<u8>
pub fn raw_getbyte(&mut self, do_keytmout: bool) -> Option<u8>
Read a raw byte from input with optional timeout
Sourcepub fn getbyte(&mut self, do_keytmout: bool) -> Option<u8>
pub fn getbyte(&mut self, do_keytmout: bool) -> Option<u8>
Get a byte from input, handling timeout
Sourcepub fn getfullchar(&mut self, do_keytmout: bool) -> Option<char>
pub fn getfullchar(&mut self, do_keytmout: bool) -> Option<char>
Get a full (possibly wide) character - always returns char in Rust
Sourcepub fn redrawhook(&mut self)
pub fn redrawhook(&mut self)
Redraw hook
Sourcepub fn zleread(
&mut self,
lprompt: &str,
rprompt: &str,
flags: ZleReadFlags,
context: ZleContext,
) -> Result<String, Error>
pub fn zleread( &mut self, lprompt: &str, rprompt: &str, flags: ZleReadFlags, context: ZleContext, ) -> Result<String, Error>
Main entry point for line reading
Sourcepub fn initmodifier(&mut self)
pub fn initmodifier(&mut self)
Initialize ZLE modifiers
Sourcepub fn handleprefixes(&mut self)
pub fn handleprefixes(&mut self)
Handle prefix commands
Sourcepub fn resetprompt(&mut self)
pub fn resetprompt(&mut self)
Reset prompt
Sourcepub fn reexpandprompt(&mut self)
pub fn reexpandprompt(&mut self)
Re-expand prompt
Sourcepub fn recursive_edit(&mut self) -> i32
pub fn recursive_edit(&mut self) -> i32
Recursive edit
Sourcepub fn finish_line(&mut self)
pub fn finish_line(&mut self)
Mark line as done (accept)
Sourcepub fn abort_line(&mut self)
pub fn abort_line(&mut self)
Abort input
Source§impl Zle
impl Zle
Sourcepub fn save_keymap(&mut self) -> SavedKeymap
pub fn save_keymap(&mut self) -> SavedKeymap
Save current keymap state Port of savekeymap() from zle_main.c
Sourcepub fn restore_keymap(&mut self, saved: SavedKeymap)
pub fn restore_keymap(&mut self, saved: SavedKeymap)
Restore keymap state Port of restorekeymap() from zle_main.c
Sourcepub fn describe_key_briefly(&mut self)
pub fn describe_key_briefly(&mut self)
Describe key briefly Port of describekeybriefly() from zle_main.c
Sourcepub fn whereis(&self, widget_name: &str) -> Vec<String>
pub fn whereis(&self, widget_name: &str) -> Vec<String>
Where is command Port of whereis() from zle_main.c
Sourcepub fn exec_immortal(&mut self, name: &str) -> bool
pub fn exec_immortal(&mut self, name: &str) -> bool
Execute an immortal (built-in) function Port of execimmortal() from zle_main.c
Sourcepub fn exec_zle_func(&mut self, name: &str, _args: &[String]) -> i32
pub fn exec_zle_func(&mut self, name: &str, _args: &[String]) -> i32
Execute a ZLE function by name Port of execzlefunc() from zle_main.c
Sourcepub fn break_read(&mut self)
pub fn break_read(&mut self)
Break read (for signals) Port of breakread() from zle_main.c
Sourcepub fn before_trap(&mut self)
pub fn before_trap(&mut self)
Handle before trap Port of zlebeforetrap() from zle_main.c
Sourcepub fn after_trap(&mut self)
pub fn after_trap(&mut self)
Handle after trap Port of zleaftertrap() from zle_main.c
Sourcepub fn zle_reset_prompt(&mut self)
pub fn zle_reset_prompt(&mut self)
ZLE reset prompt Port of zle_resetprompt() from zle_main.c
Sourcepub fn set_prompt(&mut self, prompt: &str)
pub fn set_prompt(&mut self, prompt: &str)
Set prompt
Sourcepub fn toggle_neg_arg(&mut self)
pub fn toggle_neg_arg(&mut self)
Toggle negative argument flag
Source§impl Zle
impl Zle
Sourcepub fn self_insert(&mut self, c: char)
pub fn self_insert(&mut self, c: char)
Self insert - insert the typed character Port of selfinsert() from zle_misc.c
Sourcepub fn self_insert_unmeta(&mut self, c: char)
pub fn self_insert_unmeta(&mut self, c: char)
Self insert unmeta - insert character with meta bit stripped Port of selfinsertunmeta() from zle_misc.c
Sourcepub fn accept_line(&self) -> String
pub fn accept_line(&self) -> String
Accept line - return the current line for execution Port of acceptline() from zle_misc.c
Sourcepub fn accept_and_hold(&self) -> String
pub fn accept_and_hold(&self) -> String
Accept and hold - accept line but keep it in the buffer Port of acceptandhold() from zle_misc.c
Sourcepub fn quoted_insert(&mut self, c: char)
pub fn quoted_insert(&mut self, c: char)
Quoted insert - insert next char literally Port of quotedinsert() from zle_misc.c
Sourcepub fn bracketed_paste(&mut self, text: &str)
pub fn bracketed_paste(&mut self, text: &str)
Bracketed paste - handle paste mode Port of bracketedpaste() from zle_misc.c
Sourcepub fn delete_char(&mut self)
pub fn delete_char(&mut self)
Delete char under cursor Port of deletechar() from zle_misc.c
Sourcepub fn backward_delete_char(&mut self)
pub fn backward_delete_char(&mut self)
Delete char before cursor Port of backwarddeletechar() from zle_misc.c
Sourcepub fn backward_kill_line(&mut self)
pub fn backward_kill_line(&mut self)
Kill from beginning of line to cursor Port of backwardkillline() from zle_misc.c
Sourcepub fn kill_buffer(&mut self)
pub fn kill_buffer(&mut self)
Kill entire buffer Port of killbuffer() from zle_misc.c
Sourcepub fn kill_whole_line(&mut self)
pub fn kill_whole_line(&mut self)
Kill whole line (including newlines in multi-line mode) Port of killwholeline() from zle_misc.c
Sourcepub fn exchange_point_and_mark(&mut self)
pub fn exchange_point_and_mark(&mut self)
Exchange point and mark
Sourcepub fn set_mark_here(&mut self)
pub fn set_mark_here(&mut self)
Set mark at current position
Sourcepub fn copy_region_as_kill(&mut self)
pub fn copy_region_as_kill(&mut self)
Copy region as kill Port of copyregionaskill() from zle_misc.c
Sourcepub fn kill_region(&mut self)
pub fn kill_region(&mut self)
Kill region (between point and mark) Port of killregion() from zle_misc.c
Sourcepub fn yank_pop(&mut self)
pub fn yank_pop(&mut self)
Yank pop - cycle through kill ring Port of yankpop() from zle_misc.c
Sourcepub fn transpose_chars(&mut self)
pub fn transpose_chars(&mut self)
Transpose chars Port of transposechars() from zle_misc.c
Sourcepub fn capitalize_word(&mut self)
pub fn capitalize_word(&mut self)
Capitalize word
Sourcepub fn downcase_word(&mut self)
pub fn downcase_word(&mut self)
Downcase word
Sourcepub fn upcase_word(&mut self)
pub fn upcase_word(&mut self)
Upcase word
Sourcepub fn transpose_words(&mut self)
pub fn transpose_words(&mut self)
Transpose words Port of transpose words logic
Sourcepub fn quote_line(&mut self)
pub fn quote_line(&mut self)
Quote line Port of quoteline() from zle_misc.c
Sourcepub fn quote_region(&mut self)
pub fn quote_region(&mut self)
Quote region Port of quoteregion() from zle_misc.c
Sourcepub fn what_cursor_position(&self) -> String
pub fn what_cursor_position(&self) -> String
What cursor position - display cursor info Port of whatcursorposition() from zle_misc.c
Sourcepub fn universal_argument(&mut self)
pub fn universal_argument(&mut self)
Universal argument - multiply next command Port of universalargument() from zle_misc.c
Sourcepub fn digit_argument(&mut self, digit: u8)
pub fn digit_argument(&mut self, digit: u8)
Digit argument - accumulate numeric argument Port of digitargument() from zle_misc.c
Sourcepub fn neg_argument(&mut self)
pub fn neg_argument(&mut self)
Negative argument Port of negargument() from zle_misc.c
Sourcepub fn undefined_key(&self)
pub fn undefined_key(&self)
Undefined key - beep Port of undefinedkey() from zle_misc.c
Sourcepub fn send_break(&mut self)
pub fn send_break(&mut self)
Send break - abort current operation Port of sendbreak() from zle_misc.c
Sourcepub fn vi_put_after(&mut self)
pub fn vi_put_after(&mut self)
Vi put after cursor Port of viputafter() from zle_misc.c
Sourcepub fn vi_put_before(&mut self)
pub fn vi_put_before(&mut self)
Vi put before cursor Port of viputbefore() from zle_misc.c
Sourcepub fn overwrite_mode(&mut self)
pub fn overwrite_mode(&mut self)
Overwrite mode toggle Port of overwritemode() from zle_misc.c
Sourcepub fn copy_prev_word(&mut self)
pub fn copy_prev_word(&mut self)
Copy previous word Port of copyprevword() from zle_misc.c
Sourcepub fn copy_prev_shell_word(&mut self)
pub fn copy_prev_shell_word(&mut self)
Copy previous shell word (respects quoting) Port of copyprevshellword() from zle_misc.c
Sourcepub fn pound_insert(&mut self)
pub fn pound_insert(&mut self)
Pound insert - comment toggle for vi mode Port of poundinsert() from zle_misc.c
Source§impl Zle
impl Zle
Sourcepub fn move_to_bol(&mut self)
pub fn move_to_bol(&mut self)
Move cursor to start of current physical line
Sourcepub fn move_to_eol(&mut self)
pub fn move_to_eol(&mut self)
Move cursor to end of current physical line
Sourcepub fn current_column(&self) -> usize
pub fn current_column(&self) -> usize
Get current column (0-indexed)
Sourcepub fn current_line(&self) -> usize
pub fn current_line(&self) -> usize
Get current line number (0-indexed)
Sourcepub fn count_lines(&self) -> usize
pub fn count_lines(&self) -> usize
Count total lines
Source§impl Zle
impl Zle
Sourcepub fn get_buffer(&self) -> String
pub fn get_buffer(&self) -> String
Get BUFFER parameter
Sourcepub fn set_buffer(&mut self, s: &str)
pub fn set_buffer(&mut self, s: &str)
Set BUFFER parameter
Sourcepub fn get_cursor(&self) -> usize
pub fn get_cursor(&self) -> usize
Get CURSOR parameter
Sourcepub fn set_cursor(&mut self, pos: usize)
pub fn set_cursor(&mut self, pos: usize)
Set CURSOR parameter
Sourcepub fn get_lbuffer(&self) -> String
pub fn get_lbuffer(&self) -> String
Get LBUFFER (text before cursor)
Sourcepub fn set_lbuffer(&mut self, s: &str)
pub fn set_lbuffer(&mut self, s: &str)
Set LBUFFER
Sourcepub fn get_rbuffer(&self) -> String
pub fn get_rbuffer(&self) -> String
Get RBUFFER (text after cursor)
Sourcepub fn set_rbuffer(&mut self, s: &str)
pub fn set_rbuffer(&mut self, s: &str)
Set RBUFFER
Sourcepub fn get_cutbuffer(&self) -> String
pub fn get_cutbuffer(&self) -> String
Get CUTBUFFER (kill ring top)
Sourcepub fn set_cutbuffer(&mut self, s: &str)
pub fn set_cutbuffer(&mut self, s: &str)
Set CUTBUFFER
Sourcepub fn get_bufferlines(&self) -> usize
pub fn get_bufferlines(&self) -> usize
Get BUFFERLINES (number of lines)
Sourcepub fn get_pending(&self) -> usize
pub fn get_pending(&self) -> usize
Get PENDING (number of bytes waiting)
Sourcepub fn get_keymap(&self) -> &str
pub fn get_keymap(&self) -> &str
Get current keymap name
Sourcepub fn get_numeric(&self) -> Option<i32>
pub fn get_numeric(&self) -> Option<i32>
Get NUMERIC (numeric argument if set)
Sourcepub fn is_insert_mode(&self) -> bool
pub fn is_insert_mode(&self) -> bool
Check if in insert mode
Sourcepub fn is_region_active(&self) -> bool
pub fn is_region_active(&self) -> bool
Check if region is active
Sourcepub fn get_zle_state(&self) -> String
pub fn get_zle_state(&self) -> String
Get ZLE_STATE string
Source§impl Zle
impl Zle
Sourcepub fn zrefresh(&mut self)
pub fn zrefresh(&mut self)
Main refresh function - redraws the screen Port of zrefresh() from zle_refresh.c
Sourcepub fn full_refresh(&mut self) -> Result<(), Error>
pub fn full_refresh(&mut self) -> Result<(), Error>
Full screen refresh - clears and redraws everything
Sourcepub fn partial_refresh(&mut self) -> Result<(), Error>
pub fn partial_refresh(&mut self) -> Result<(), Error>
Partial refresh (optimize for minimal updates)
Sourcepub fn clearscreen(&mut self)
pub fn clearscreen(&mut self)
Clear the screen Port of clearscreen() from zle_refresh.c
Sourcepub fn moveto(&mut self, row: usize, col: usize)
pub fn moveto(&mut self, row: usize, col: usize)
Move cursor to position Port of moveto() from zle_refresh.c
Sourcepub fn tc_downcurs(&mut self, count: usize)
pub fn tc_downcurs(&mut self, count: usize)
Move cursor down Port of tc_downcurs() from zle_refresh.c
Sourcepub fn tc_rightcurs(&mut self, count: usize)
pub fn tc_rightcurs(&mut self, count: usize)
Move cursor right Port of tc_rightcurs() from zle_refresh.c
Sourcepub fn scrollwindow(&mut self, lines: i32)
pub fn scrollwindow(&mut self, lines: i32)
Scroll window up Port of scrollwindow() from zle_refresh.c
Sourcepub fn singlerefresh(&mut self)
pub fn singlerefresh(&mut self)
Single line refresh Port of singlerefresh() from zle_refresh.c
Sourcepub fn refreshline(&mut self, _line: usize)
pub fn refreshline(&mut self, _line: usize)
Refresh a single line Port of refreshline() from zle_refresh.c
Source§impl Zle
impl Zle
Sourcepub fn select_text_object(
&self,
obj_type: TextObjectType,
kind: TextObjectKind,
) -> Option<TextObject>
pub fn select_text_object( &self, obj_type: TextObjectType, kind: TextObjectKind, ) -> Option<TextObject>
Select a text object
Source§impl Zle
impl Zle
Sourcepub fn complete_word(&mut self, state: &mut CompletionState)
pub fn complete_word(&mut self, state: &mut CompletionState)
Complete word - trigger completion Port of completeword() from zle_tricky.c
Menu complete - cycle through completions Port of menucomplete() from zle_tricky.c
Reverse menu complete - cycle backwards Port of reversemenucomplete() from zle_tricky.c
Sourcepub fn expand_or_complete(&mut self, state: &mut CompletionState)
pub fn expand_or_complete(&mut self, state: &mut CompletionState)
Expand or complete - try expansion first, then completion Port of expandorcomplete() from zle_tricky.c
Sourcepub fn expand_or_complete_prefix(&mut self, state: &mut CompletionState)
pub fn expand_or_complete_prefix(&mut self, state: &mut CompletionState)
Expand or complete prefix - expand/complete keeping suffix Port of expandorcompleteprefix() from zle_tricky.c
Sourcepub fn list_choices(&mut self, state: &mut CompletionState)
pub fn list_choices(&mut self, state: &mut CompletionState)
List choices - show available completions Port of listchoices() from zle_tricky.c
Sourcepub fn list_expand(&mut self)
pub fn list_expand(&mut self)
List expand - list possible expansions Port of listexpand() from zle_tricky.c
Sourcepub fn expand_word(&mut self)
pub fn expand_word(&mut self)
Expand word - expand current word (glob, history, etc) Port of expandword() from zle_tricky.c
Sourcepub fn expand_history(&mut self)
pub fn expand_history(&mut self)
Expand history - expand history references Port of expandhistory() / doexpandhist() from zle_tricky.c
Sourcepub fn magic_space(&mut self)
pub fn magic_space(&mut self)
Magic space - expand history then insert space Port of magicspace() from zle_tricky.c
Sourcepub fn delete_char_or_list(&mut self, state: &mut CompletionState)
pub fn delete_char_or_list(&mut self, state: &mut CompletionState)
Delete char or list - delete if there’s text, else list completions Port of deletecharorlist() from zle_tricky.c
Accept and menu complete Port of acceptandmenucomplete() from zle_tricky.c
Sourcepub fn spell_word(&mut self)
pub fn spell_word(&mut self)
Spell word - check spelling Port of spellword() from zle_tricky.c
Source§impl Zle
impl Zle
Sourcepub fn insert_str(&mut self, s: &str)
pub fn insert_str(&mut self, s: &str)
Insert string at cursor position
Sourcepub fn insert_chars(&mut self, chars: &[char])
pub fn insert_chars(&mut self, chars: &[char])
Insert chars at cursor position
Sourcepub fn delete_chars(&mut self, n: usize)
pub fn delete_chars(&mut self, n: usize)
Delete n characters at cursor position
Sourcepub fn backspace_chars(&mut self, n: usize)
pub fn backspace_chars(&mut self, n: usize)
Delete n characters before cursor
Sourcepub fn clear_line(&mut self)
pub fn clear_line(&mut self)
Clear the line
Sourcepub fn get_region(&self) -> &[char]
pub fn get_region(&self) -> &[char]
Get region between point and mark
Sourcepub fn cut_to_buffer(&mut self, buf: usize, append: bool)
pub fn cut_to_buffer(&mut self, buf: usize, append: bool)
Cut to named buffer
Sourcepub fn paste_from_buffer(&mut self, buf: usize, after: bool)
pub fn paste_from_buffer(&mut self, buf: usize, after: bool)
Paste from named buffer
Source§impl Zle
impl Zle
Sourcepub fn find_bol(&self, pos: usize) -> usize
pub fn find_bol(&self, pos: usize) -> usize
Find beginning of line from position Port of findbol() from zle_utils.c
Sourcepub fn find_eol(&self, pos: usize) -> usize
pub fn find_eol(&self, pos: usize) -> usize
Find end of line from position Port of findeol() from zle_utils.c
Sourcepub fn find_line(&self, pos: usize) -> usize
pub fn find_line(&self, pos: usize) -> usize
Find line number for position Port of findline() from zle_utils.c
Sourcepub fn size_line(&mut self, needed: usize)
pub fn size_line(&mut self, needed: usize)
Ensure line has enough space Port of sizeline() from zle_utils.c
Sourcepub fn space_in_line(&mut self, pos: usize, count: usize)
pub fn space_in_line(&mut self, pos: usize, count: usize)
Make space in line at position Port of spaceinline() from zle_utils.c
Sourcepub fn shift_chars(&mut self, from: usize, count: i32)
pub fn shift_chars(&mut self, from: usize, count: i32)
Shift characters in line Port of shiftchars() from zle_utils.c
Sourcepub fn fore_del(&mut self, count: usize, flags: CutFlags)
pub fn fore_del(&mut self, count: usize, flags: CutFlags)
Delete forward Port of foredel() from zle_utils.c
Sourcepub fn back_del(&mut self, count: usize, flags: CutFlags)
pub fn back_del(&mut self, count: usize, flags: CutFlags)
Delete backward Port of backdel() from zle_utils.c
Sourcepub fn fore_kill(&mut self, count: usize, append: bool)
pub fn fore_kill(&mut self, count: usize, append: bool)
Kill forward Port of forekill() from zle_utils.c
Sourcepub fn back_kill(&mut self, count: usize, append: bool)
pub fn back_kill(&mut self, count: usize, append: bool)
Kill backward Port of backkill() from zle_utils.c
Sourcepub fn cut_text(&mut self, start: usize, end: usize, dir: CutDirection)
pub fn cut_text(&mut self, start: usize, end: usize, dir: CutDirection)
Cut text to buffer Port of cut() / cuttext() from zle_utils.c
Sourcepub fn set_last_line(&mut self)
pub fn set_last_line(&mut self)
Set the last line (for history) Port of setlastline() from zle_utils.c
Sourcepub fn handle_feep(&self)
pub fn handle_feep(&self)
Handle a feep (beep/error) Port of handlefeep() from zle_utils.c
Sourcepub fn add_to_line(&mut self, pos: usize, text: &str)
pub fn add_to_line(&mut self, pos: usize, text: &str)
Add text to line at position Port of zleaddtoline() from zle_utils.c
Sourcepub fn line_as_string(&self) -> String
pub fn line_as_string(&self) -> String
Get line as string Port of zlelineasstring() from zle_utils.c
Sourcepub fn string_as_line(&mut self, s: &str)
pub fn string_as_line(&mut self, s: &str)
Set line from string Port of stringaszleline() from zle_utils.c
Sourcepub fn get_zle_line(&self) -> &[char]
pub fn get_zle_line(&self) -> &[char]
Get ZLE line Port of zlegetline() from zle_utils.c
Sourcepub fn get_zle_query(&self) -> Option<String>
pub fn get_zle_query(&self) -> Option<String>
Get ZLE query (for menu selection etc) Port of getzlequery() from zle_utils.c
Sourcepub fn handle_suffix(&mut self)
pub fn handle_suffix(&mut self)
Handle suffix (for completion) Port of handlesuffix() from zle_utils.c
Source§impl Zle
Position save/restore
Port of zle_save_positions() / zle_restore_positions() from zle_utils.c
impl Zle
Position save/restore Port of zle_save_positions() / zle_restore_positions() from zle_utils.c
pub fn save_positions(&self) -> SavedPositions
pub fn restore_positions(&mut self, saved: &SavedPositions)
Source§impl Zle
impl Zle
Sourcepub fn vi_get_arg(&self) -> i32
pub fn vi_get_arg(&self) -> i32
Get numeric argument (mult)
Sourcepub fn vi_find_char(&mut self, forward: bool, skip: bool)
pub fn vi_find_char(&mut self, forward: bool, skip: bool)
Handle vi find character (f/F/t/T)
Sourcepub fn vi_match_bracket(&mut self)
pub fn vi_match_bracket(&mut self)
Vi percent match (find matching bracket)
Sourcepub fn vi_replace_mode(&mut self)
pub fn vi_replace_mode(&mut self)
Vi replace mode (R command)
Sourcepub fn vi_swap_case(&mut self)
pub fn vi_swap_case(&mut self)
Vi swap case
Sourcepub fn vi_visual_mode(&mut self)
pub fn vi_visual_mode(&mut self)
Vi visual mode
Sourcepub fn vi_visual_line_mode(&mut self)
pub fn vi_visual_line_mode(&mut self)
Vi visual line mode
Sourcepub fn vi_visual_block_mode(&mut self)
pub fn vi_visual_block_mode(&mut self)
Vi visual block mode
Sourcepub fn vi_set_mark(&mut self, name: char)
pub fn vi_set_mark(&mut self, name: char)
Vi set mark
Sourcepub fn vi_goto_mark(&mut self, name: char)
pub fn vi_goto_mark(&mut self, name: char)
Vi goto mark
Sourcepub fn vi_record_change(&mut self, key: u8)
pub fn vi_record_change(&mut self, key: u8)
Record keys for vi repeat
Sourcepub fn vi_repeat_change(&mut self)
pub fn vi_repeat_change(&mut self)
Replay last change (dot command)
Source§impl Zle
impl Zle
Sourcepub fn find_word_start(&self, style: WordStyle) -> usize
pub fn find_word_start(&self, style: WordStyle) -> usize
Find the start of the current/previous word
Sourcepub fn find_word_end(&self, style: WordStyle) -> usize
pub fn find_word_end(&self, style: WordStyle) -> usize
Find the end of the current/next word
Sourcepub fn get_current_word(&self, style: WordStyle) -> &[char]
pub fn get_current_word(&self, style: WordStyle) -> &[char]
Get the current word
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Zle
impl RefUnwindSafe for Zle
impl Send for Zle
impl Sync for Zle
impl Unpin for Zle
impl UnsafeUnpin for Zle
impl UnwindSafe for Zle
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<F, T> IntoSample<T> for Fwhere
T: FromSample<F>,
impl<F, T> IntoSample<T> for Fwhere
T: FromSample<F>,
fn into_sample(self) -> T
Source§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.Source§impl<U, T> ToOwnedObj<U> for Twhere
U: FromObjRef<T>,
impl<U, T> ToOwnedObj<U> for Twhere
U: FromObjRef<T>,
Source§fn to_owned_obj(&self, data: FontData<'_>) -> U
fn to_owned_obj(&self, data: FontData<'_>) -> U
T, using the provided data to resolve any offsets.