Skip to content

Commit

Permalink
Add ctrl left/right word navigation
Browse files Browse the repository at this point in the history
  • Loading branch information
JasonBrownDeveloper committed Oct 26, 2023
1 parent c773620 commit 5c393c1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/input_handler.cc
Original file line number Diff line number Diff line change
Expand Up @@ -520,11 +520,11 @@ class LineEditor
m_line = m_line.substr(0, m_cursor_pos)
+ m_line.substr(m_cursor_pos+1);
}
else if (key == alt('f'))
else if (key == ctrl(Key::Right) or key == alt('f'))
to_next_word_begin<Word>(m_cursor_pos, m_line);
else if (key == alt('F'))
to_next_word_begin<WORD>(m_cursor_pos, m_line);
else if (key == alt('b'))
else if (key == ctrl(Key::Left) or key == alt('b'))
to_prev_word_begin<Word>(m_cursor_pos, m_line);
else if (key == alt('B'))
to_prev_word_begin<WORD>(m_cursor_pos, m_line);
Expand Down

0 comments on commit 5c393c1

Please sign in to comment.