mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-06-17 11:01:14 -03:00
implement swap-selection-start-stop function
The swap-selection-start-stop function goes to the other end of the highlighted text, the equivalent of `o' for vim visual mode. Add binding to the swap-selection-start-stop function, `o' when in visual mode. Document swap-selection-start-stop, begin-selection, end-selection, kill-selection.
This commit is contained in:
committed by
Kurtis Rader
parent
879ee61a30
commit
168a156e58
@@ -4026,6 +4026,17 @@ const wchar_t *reader_readline(int nchars)
|
||||
break;
|
||||
}
|
||||
|
||||
case R_SWAP_SELECTION_START_STOP:
|
||||
{
|
||||
if (!data->sel_active) break;
|
||||
size_t tmp = data->sel_begin_pos;
|
||||
data->sel_begin_pos = data->command_line.position;
|
||||
data->sel_start_pos = data->command_line.position;
|
||||
editable_line_t *el = data->active_edit_line();
|
||||
update_buff_pos(el, tmp);
|
||||
break;
|
||||
}
|
||||
|
||||
case R_END_SELECTION:
|
||||
{
|
||||
data->sel_active = false;
|
||||
|
||||
Reference in New Issue
Block a user