pub fn type_char(&mut self, c: char) {
        self.clamp();
        if let Some(anchor) = self.selection.anchor {
            self.delete_selection(self.selection.focus, anchor);
        }
        self.insert_char(0, c);
        if c == '\n' {
            self.selection.focus.col = 0;
            self.selection.focus.ln += 1;
        } else {
            self.selection.focus.col = self.selection.focus.col + 1;
        }
    }
/// Type a character at the cursor.
Type a character at the cursor.
Type a character at the cursor .
pub fn type_char(&mut self, c: char) {
        self.clamp();
        if let Some(anchor) = self.selection.anchor {
            self.delete_selection(self.selection.focus, anchor);
        }
        self.insert_char(0, c);
        if c == '\n' {
            self.selection.focus.col = 0;
            self.selection.focus.ln += 1;
        } else {
            self.selection.focus.col = self.selection.focus.col + 1;
        }
    }
pub fn type_char ( & mut self , c : char ) { self . clamp ( ) ; if let Some ( anchor ) = self . selection . anchor { self . delete_selection ( self . selection . focus , anchor ) ; } self . insert_char ( 0 , c ) ; if c == '\n' { self . selection . focus . col = 0 ; self . selection . focus . ln += 1 ; } else { self . selection . focus . col = self . selection . focus . col + 1 ; } }
Type a character at the cursor.
Type a character at the cursor .
&mut self
c
char
&mut self
c
char