]> granicus.if.org Git - vim/commitdiff
patch 8.1.0447: GUI scrollbar test fails with Athena and Motif v8.1.0447
authorBram Moolenaar <Bram@vim.org>
Tue, 2 Oct 2018 14:23:58 +0000 (16:23 +0200)
committerBram Moolenaar <Bram@vim.org>
Tue, 2 Oct 2018 14:23:58 +0000 (16:23 +0200)
Problem:    GUI scrollbar test fails with Athena and Motif.
Solution:   When not using on-the-fly scrolling call normal_cmd().

src/evalfunc.c
src/ex_docmd.c
src/proto/ex_docmd.pro
src/version.c

index dd9bc1811ff4f592ffc26c6eb97a829290c6e68c..c9f4c4581c4311f5df95b6669a5c8049e7f6deec 100644 (file)
@@ -3588,7 +3588,7 @@ f_feedkeys(typval_T *argvars, typval_T *rettv UNUSED)
 
                if (!dangerous)
                    ++ex_normal_busy;
-               exec_normal(TRUE, TRUE);
+               exec_normal(TRUE, FALSE, TRUE);
                if (!dangerous)
                    --ex_normal_busy;
 
@@ -13233,6 +13233,10 @@ f_test_scrollbar(typval_T *argvars, typval_T *rettv UNUSED)
        return;
     }
     gui_drag_scrollbar(sb, value, dragging);
+# ifndef USE_ON_FLY_SCROLL
+    // need to loop through normal_cmd() to handle the scroll events
+    exec_normal(FALSE, TRUE, FALSE);
+# endif
 }
 #endif
 
index 2d233ace86130d4a1b87d39c1f83740ae15af9fe..70acfc83d3ffcc6f922a30f7e9c67f6b6610225a 100644 (file)
@@ -10471,21 +10471,24 @@ exec_normal_cmd(char_u *cmd, int remap, int silent)
 {
     /* Stuff the argument into the typeahead buffer. */
     ins_typebuf(cmd, remap, 0, TRUE, silent);
-    exec_normal(FALSE, FALSE);
+    exec_normal(FALSE, FALSE, FALSE);
 }
 
 /*
  * Execute normal_cmd() until there is no typeahead left.
+ * When "use_vpeekc" is TRUE use vpeekc() to check for available chars.
  */
     void
-exec_normal(int was_typed, int may_use_terminal_loop UNUSED)
+exec_normal(int was_typed, int use_vpeekc, int may_use_terminal_loop UNUSED)
 {
     oparg_T    oa;
 
     clear_oparg(&oa);
     finish_op = FALSE;
-    while ((!stuff_empty() || ((was_typed || !typebuf_typed())
-                   && typebuf.tb_len > 0)) && !got_int)
+    while ((!stuff_empty()
+               || ((was_typed || !typebuf_typed()) && typebuf.tb_len > 0)
+               || (use_vpeekc && vpeekc() != NUL))
+           && !got_int)
     {
        update_topline_cursor();
 #ifdef FEAT_TERMINAL
index 8baf953b74f567df1b89d56e77f3d119d75d268c..ed42f1cf1525fc065e2a1ef69c87ef1bda70afca 100644 (file)
@@ -59,7 +59,7 @@ int save_current_state(save_state_T *sst);
 void restore_current_state(save_state_T *sst);
 void ex_normal(exarg_T *eap);
 void exec_normal_cmd(char_u *cmd, int remap, int silent);
-void exec_normal(int was_typed, int may_use_terminal_loop);
+void exec_normal(int was_typed, int use_vpeekc, int may_use_terminal_loop);
 int find_cmdline_var(char_u *src, int *usedlen);
 char_u *eval_vars(char_u *src, char_u *srcstart, int *usedlen, linenr_T *lnump, char_u **errormsg, int *escaped);
 char_u *expand_sfile(char_u *arg);
index c5153eca7b090d421aa1fcc9583812d2c9122410..717425afaf1f545499b2921c52ca42f56b7a5579 100644 (file)
@@ -792,6 +792,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    447,
 /**/
     446,
 /**/