]> granicus.if.org Git - vim/commitdiff
patch 8.2.3465: cannot detect insert scroll mode v8.2.3465
authorzeertzjq <zeertzjq@outlook.com>
Sun, 3 Oct 2021 11:01:27 +0000 (12:01 +0100)
committerBram Moolenaar <Bram@vim.org>
Sun, 3 Oct 2021 11:01:27 +0000 (12:01 +0100)
Problem:    Cannot detect insert scroll mode.
Solution:   Add "scroll" to complete_info(). (closes #8943)

runtime/doc/eval.txt
src/insexpand.c
src/testdir/test_popup.vim
src/version.c

index 43aae40d4cbfeefa721f5a2f5773d34c6e342e45..588f51155355d3f4ba9c6e4133acf732cd7ddfbf 100644 (file)
@@ -3883,6 +3883,8 @@ complete_info([{what}])                           *complete_info()*
                   ""                Not in completion mode
                   "keyword"         Keyword completion |i_CTRL-X_CTRL-N|
                   "ctrl_x"          Just pressed CTRL-X |i_CTRL-X|
+                  "scroll"          Scrolling with |i_CTRL-X_CTRL-E| or
+                                    |i_CTRL-X_CTRL-Y|
                   "whole_line"      Whole lines |i_CTRL-X_CTRL-L|
                   "files"           File names |i_CTRL-X_CTRL-F|
                   "tags"            Tags |i_CTRL-X_CTRL-]|
index 0e363f737544b1da22a2164851ca5b6c1145f4c5..ee8263c8b8f29b7e9d5bc362cc0b6419432860ac 100644 (file)
@@ -68,7 +68,7 @@ static char *ctrl_x_msgs[] =
 static char *ctrl_x_mode_names[] = {
        "keyword",
        "ctrl_x",
-       "unknown",          // CTRL_X_SCROLL
+       "scroll",
        "whole_line",
        "files",
        "tags",
@@ -2539,7 +2539,8 @@ f_complete_check(typval_T *argvars UNUSED, typval_T *rettv)
     static char_u *
 ins_compl_mode(void)
 {
-    if (ctrl_x_mode == CTRL_X_NOT_DEFINED_YET || compl_started)
+    if (ctrl_x_mode == CTRL_X_NOT_DEFINED_YET || ctrl_x_mode == CTRL_X_SCROLL
+           || compl_started)
        return (char_u *)ctrl_x_mode_names[ctrl_x_mode & ~CTRL_X_WANT_IDENT];
 
     return (char_u *)"";
index 1d0a77c17c3685683454f0bc3ec16e6d87f73a63..0799df54807c4376319764cee0fa03196bddba3c 100644 (file)
@@ -990,6 +990,10 @@ func Test_popup_complete_info_01()
         \ ["\<C-X>", 'ctrl_x'],
         \ ["\<C-X>\<C-N>", 'keyword'],
         \ ["\<C-X>\<C-P>", 'keyword'],
+        \ ["\<C-X>\<C-E>", 'scroll'],
+        \ ["\<C-X>\<C-Y>", 'scroll'],
+        \ ["\<C-X>\<C-E>\<C-E>\<C-Y>", 'scroll'],
+        \ ["\<C-X>\<C-Y>\<C-E>\<C-Y>", 'scroll'],
         \ ["\<C-X>\<C-L>", 'whole_line'],
         \ ["\<C-X>\<C-F>", 'files'],
         \ ["\<C-X>\<C-]>", 'tags'],
index 4e4f4fd158d73bf4de7ae3e8cb441c8bed7e81f7..79f88eb72154d7be30ecf5e43dfbac238916cd12 100644 (file)
@@ -757,6 +757,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    3465,
 /**/
     3464,
 /**/