comparison 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
comparison
equal deleted inserted replaced
13447:17eebaa3188f 13448:a62b0bbc8834
1791 void vterm_state_get_cursorpos(const VTermState *state, VTermPos *cursorpos) 1791 void vterm_state_get_cursorpos(const VTermState *state, VTermPos *cursorpos)
1792 { 1792 {
1793 *cursorpos = state->pos; 1793 *cursorpos = state->pos;
1794 } 1794 }
1795 1795
1796 void vterm_state_get_mousestate(const VTermState *state, VTermMouseState *mousestate)
1797 {
1798 mousestate->pos.col = state->mouse_col;
1799 mousestate->pos.row = state->mouse_row;
1800 mousestate->buttons = state->mouse_buttons;
1801 mousestate->flags = state->mouse_flags;
1802 }
1803
1796 void vterm_state_set_callbacks(VTermState *state, const VTermStateCallbacks *callbacks, void *user) 1804 void vterm_state_set_callbacks(VTermState *state, const VTermStateCallbacks *callbacks, void *user)
1797 { 1805 {
1798 if(callbacks) { 1806 if(callbacks) {
1799 state->callbacks = callbacks; 1807 state->callbacks = callbacks;
1800 state->cbdata = user; 1808 state->cbdata = user;