Mercurial > vim
comparison src/libvterm/include/vterm.h @ 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 | c5bccd50100e |
children | 9f857e6310b6 |
comparison
equal
deleted
inserted
replaced
13447:17eebaa3188f | 13448:a62b0bbc8834 |
---|---|
257 int (*bell)(void *user); | 257 int (*bell)(void *user); |
258 int (*resize)(int rows, int cols, VTermPos *delta, void *user); | 258 int (*resize)(int rows, int cols, VTermPos *delta, void *user); |
259 int (*setlineinfo)(int row, const VTermLineInfo *newinfo, const VTermLineInfo *oldinfo, void *user); | 259 int (*setlineinfo)(int row, const VTermLineInfo *newinfo, const VTermLineInfo *oldinfo, void *user); |
260 } VTermStateCallbacks; | 260 } VTermStateCallbacks; |
261 | 261 |
262 typedef struct { | |
263 VTermPos pos; | |
264 int buttons; | |
265 #define MOUSE_BUTTON_LEFT 0x01 | |
266 #define MOUSE_BUTTON_MIDDLE 0x02 | |
267 #define MOUSE_BUTTON_RIGHT 0x04 | |
268 int flags; | |
269 #define MOUSE_WANT_CLICK 0x01 | |
270 #define MOUSE_WANT_DRAG 0x02 | |
271 #define MOUSE_WANT_MOVE 0x04 | |
272 /* useful to add protocol? */ | |
273 } VTermMouseState; | |
274 | |
262 VTermState *vterm_obtain_state(VTerm *vt); | 275 VTermState *vterm_obtain_state(VTerm *vt); |
263 | 276 |
264 void vterm_state_set_callbacks(VTermState *state, const VTermStateCallbacks *callbacks, void *user); | 277 void vterm_state_set_callbacks(VTermState *state, const VTermStateCallbacks *callbacks, void *user); |
265 void *vterm_state_get_cbdata(VTermState *state); | 278 void *vterm_state_get_cbdata(VTermState *state); |
266 | 279 |
270 | 283 |
271 /* Initialize the state. */ | 284 /* Initialize the state. */ |
272 void vterm_state_reset(VTermState *state, int hard); | 285 void vterm_state_reset(VTermState *state, int hard); |
273 | 286 |
274 void vterm_state_get_cursorpos(const VTermState *state, VTermPos *cursorpos); | 287 void vterm_state_get_cursorpos(const VTermState *state, VTermPos *cursorpos); |
288 void vterm_state_get_mousestate(const VTermState *state, VTermMouseState *mousestate); | |
275 void vterm_state_get_default_colors(const VTermState *state, VTermColor *default_fg, VTermColor *default_bg); | 289 void vterm_state_get_default_colors(const VTermState *state, VTermColor *default_fg, VTermColor *default_bg); |
276 void vterm_state_get_palette_color(const VTermState *state, int index, VTermColor *col); | 290 void vterm_state_get_palette_color(const VTermState *state, int index, VTermColor *col); |
277 void vterm_state_set_default_colors(VTermState *state, const VTermColor *default_fg, const VTermColor *default_bg); | 291 void vterm_state_set_default_colors(VTermState *state, const VTermColor *default_fg, const VTermColor *default_bg); |
278 void vterm_state_set_palette_color(VTermState *state, int index, const VTermColor *col); | 292 void vterm_state_set_palette_color(VTermState *state, int index, const VTermColor *col); |
279 void vterm_state_set_bold_highbright(VTermState *state, int bold_is_highbright); | 293 void vterm_state_set_bold_highbright(VTermState *state, int bold_is_highbright); |