Mercurial > vim
diff src/vim.h @ 17069:76ae212a9075 v8.1.1534
patch 8.1.1534: modeless selection in popup window selects too much
commit https://github.com/vim/vim/commit/bd75b5333d10e63f7a667d4b65e80d309435629e
Author: Bram Moolenaar <Bram@vim.org>
Date: Fri Jun 14 23:41:55 2019 +0200
patch 8.1.1534: modeless selection in popup window selects too much
Problem: Modeless selection in popup window selects too much.
Solution: Restrict the selection to insde of the popup window.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Fri, 14 Jun 2019 23:45:06 +0200 |
parents | 58bf4faa5c05 |
children | 620e9011b685 |
line wrap: on
line diff
--- a/src/vim.h +++ b/src/vim.h @@ -2008,34 +2008,41 @@ typedef int sock_T; /* Info about selected text */ typedef struct { - int available; /* Is clipboard available? */ - int owned; /* Flag: do we own the selection? */ - pos_T start; /* Start of selected area */ - pos_T end; /* End of selected area */ - int vmode; /* Visual mode character */ + int available; // Is clipboard available? + int owned; // Flag: do we own the selection? + pos_T start; // Start of selected area + pos_T end; // End of selected area + int vmode; // Visual mode character - /* Fields for selection that doesn't use Visual mode */ + // Fields for selection that doesn't use Visual mode short_u origin_row; short_u origin_start_col; short_u origin_end_col; short_u word_start_col; short_u word_end_col; +#ifdef FEAT_TEXT_PROP + // limits for selection inside a popup window + short_u min_col; + short_u max_col; + short_u min_row; + short_u max_row; +#endif - pos_T prev; /* Previous position */ - short_u state; /* Current selection state */ - short_u mode; /* Select by char, word, or line. */ + pos_T prev; // Previous position + short_u state; // Current selection state + short_u mode; // Select by char, word, or line. # if defined(FEAT_GUI_X11) || defined(FEAT_XCLIPBOARD) - Atom sel_atom; /* PRIMARY/CLIPBOARD selection ID */ + Atom sel_atom; // PRIMARY/CLIPBOARD selection ID # endif # ifdef FEAT_GUI_GTK - GdkAtom gtk_sel_atom; /* PRIMARY/CLIPBOARD selection ID */ + GdkAtom gtk_sel_atom; // PRIMARY/CLIPBOARD selection ID # endif # if defined(MSWIN) || defined(FEAT_CYGWIN_WIN32_CLIPBOARD) - int_u format; /* Vim's own special clipboard format */ - int_u format_raw; /* Vim's raw text clipboard format */ + int_u format; // Vim's own special clipboard format + int_u format_raw; // Vim's raw text clipboard format # endif } Clipboard_T; #else