diff --git a/src/completion.rs b/src/completion.rs index 7747025139e01e59e9bd963fa361761769a69585..778bc43ad29422dce3e0cf30cb6f41069c952a33 100644 --- a/src/completion.rs +++ b/src/completion.rs @@ -68,6 +68,7 @@ pub struct FilenameCompleter { break_chars: BTreeSet<char>, } +// rl_basic_word_break_characters, rl_completer_word_break_characters #[cfg(unix)] static DEFAULT_BREAK_CHARS: [char; 18] = [ ' ', '\t', '\n', '"', '\\', '\'', '`', '@', '$', '>', '<', '=', ';', '|', '&', '{', '(', '\0', diff --git a/src/config.rs b/src/config.rs index 4c54e7999a7fed1db8f33464e2d0654a23587f7a..d1dbc42b6408049a2ec7b0e596fadf673e840564 100644 --- a/src/config.rs +++ b/src/config.rs @@ -5,7 +5,7 @@ use std::default::Default; #[derive(Clone, Copy, Debug, PartialEq, Eq)] pub struct Config { /// Maximum number of entries in History. - max_history_size: usize, + max_history_size: usize, // history_max_entries history_duplicates: HistoryDuplicates, history_ignore_space: bool, completion_type: CompletionType, diff --git a/src/edit.rs b/src/edit.rs index e9004208ccfbbbbc259b3567fadf456282e72a9c..cea72afbea1bd6f16b63796fd66041aa4da3573f 100644 --- a/src/edit.rs +++ b/src/edit.rs @@ -19,7 +19,7 @@ use undo::Changeset; /// Implement rendering. pub struct State<'out, 'prompt> { pub out: &'out mut Renderer, - prompt: &'prompt str, // Prompt to display + prompt: &'prompt str, // Prompt to display (rl_prompt) prompt_size: Position, // Prompt Unicode/visible width and height pub line: LineBuffer, // Edited line buffer cursor: Position, /* Cursor position (relative to the start of the prompt diff --git a/src/line_buffer.rs b/src/line_buffer.rs index 2316a028dcf2d0f76f0e7cf88983af36cf673804..628d66a96b7f63ca73d9434e9ea2b511bf072961 100644 --- a/src/line_buffer.rs +++ b/src/line_buffer.rs @@ -47,8 +47,8 @@ pub trait ChangeListener: DeleteListener { /// /// The methods do text manipulations or/and cursor movements. pub struct LineBuffer { - buf: String, // Edited line buffer - pos: usize, // Current cursor position (byte position) + buf: String, // Edited line buffer (rl_line_buffer) + pos: usize, // Current cursor position (byte position) (rl_point) dl: Option<Rc<RefCell<DeleteListener>>>, cl: Option<Rc<RefCell<ChangeListener>>>, } diff --git a/src/tty/mod.rs b/src/tty/mod.rs index 72dc1fc1a65e35b1ffaf0485fad954ee91a43e67..1476be64ebb3e1abb8987d4c3f274f7f7a9a0c8e 100644 --- a/src/tty/mod.rs +++ b/src/tty/mod.rs @@ -116,8 +116,8 @@ impl<'a, R: Renderer + ?Sized> Renderer for &'a mut R { /// Terminal contract pub trait Term { - type Reader: RawReader; - type Writer: Renderer; + type Reader: RawReader; // rl_instream + type Writer: Renderer; // rl_outstream type Mode: RawMode; fn new() -> Self;