Mercurial > vim
diff src/libvterm/src/state.c @ 13448:a62b0bbc8834 v8.0.1598
patch 8.0.1598: cannot select text in a terminal with the mouse
commit https://github.com/vim/vim/commit/c48369c3fc507f398abbc933a60f653c6abe6701
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun Mar 11 19:30:45 2018 +0100
patch 8.0.1598: cannot select text in a terminal with the mouse
Problem: Cannot select text in a terminal with the mouse.
Solution: When a job in a terminal is not consuming mouse events, use them
for modeless selection. Also stop Insert mode when clicking in a
terminal window.
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Sun, 11 Mar 2018 19:45:05 +0100 |
parents | 5e47c4bdf3a6 |
children | 9f857e6310b6 |
line wrap: on
line diff
--- a/src/libvterm/src/state.c +++ b/src/libvterm/src/state.c @@ -1793,6 +1793,14 @@ void vterm_state_get_cursorpos(const VTe *cursorpos = state->pos; } +void vterm_state_get_mousestate(const VTermState *state, VTermMouseState *mousestate) +{ + mousestate->pos.col = state->mouse_col; + mousestate->pos.row = state->mouse_row; + mousestate->buttons = state->mouse_buttons; + mousestate->flags = state->mouse_flags; +} + void vterm_state_set_callbacks(VTermState *state, const VTermStateCallbacks *callbacks, void *user) { if(callbacks) {