fn match_cursor_text(&self, text_col: usize) -> usize {
        let ref line = self.current_line;
        let mut count = 0;
        let mut chars = line.chars();
        for n in 0..text_col {
            if let Some(c) = chars.next() {
                if c == '\t' {
                    count += self.tab_size;
                } else {
                    count += 1;
                }
            } else if n == line.len() {
                // Extra char for editing mode
                count += 1;
            }
        }

        count
    }
// Match the cursor column based on current text line position
Match the cursor column based on current text line position
Match the cursor column based on current text line position
fn match_cursor_text(&self, text_col: usize) -> usize {
        let ref line = self.current_line;
        let mut count = 0;
        let mut chars = line.chars();
        for n in 0..text_col {
            if let Some(c) = chars.next() {
                if c == '\t' {
                    count += self.tab_size;
                } else {
                    count += 1;
                }
            } else if n == line.len() {
                // Extra char for editing mode
                count += 1;
            }
        }
        count
    }
fn match_cursor_text ( & self , text_col : usize ) -> usize { let ref line = self . current_line ; let mut count = 0 ; let mut chars = line . chars ( ) ; for n in 0 .. text_col { if let Some ( c ) = chars . next ( ) { if c == '\t' { count += self . tab_size ; } else { count += 1 ; } } else if n == line . len ( ) { // Extra char for editing mode count += 1 ; } } count }
Match the cursor column based on current text line position
Match the cursor column based on current text line position
&self
text_col
usize
&self
text_col
usize