summaryrefslogtreecommitdiff
path: root/data/vim/patches/8.1.0447
blob: 34d400d0280fb567745894c8011848e058fe694b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
To: vim_dev@googlegroups.com
Subject: Patch 8.1.0447
Fcc: outbox
From: Bram Moolenaar <Bram@moolenaar.net>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
------------

Patch 8.1.0447
Problem:    GUI scrollbar test fails with Athena and Motif.
Solution:   When not using on-the-fly scrolling call normal_cmd().
Files:	    src/evalfunc.c, src/ex_docmd.c, src/proto/ex_docmd.pro


*** ../vim-8.1.0446/src/evalfunc.c	2018-09-30 21:43:17.183693376 +0200
--- src/evalfunc.c	2018-10-02 16:21:11.584227329 +0200
***************
*** 3588,3594 ****
  
  		if (!dangerous)
  		    ++ex_normal_busy;
! 		exec_normal(TRUE, TRUE);
  		if (!dangerous)
  		    --ex_normal_busy;
  
--- 3588,3594 ----
  
  		if (!dangerous)
  		    ++ex_normal_busy;
! 		exec_normal(TRUE, FALSE, TRUE);
  		if (!dangerous)
  		    --ex_normal_busy;
  
***************
*** 13233,13238 ****
--- 13233,13242 ----
  	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
  
*** ../vim-8.1.0446/src/ex_docmd.c	2018-09-30 21:43:17.187693348 +0200
--- src/ex_docmd.c	2018-10-02 16:22:09.711805347 +0200
***************
*** 10471,10491 ****
  {
      /* Stuff the argument into the typeahead buffer. */
      ins_typebuf(cmd, remap, 0, TRUE, silent);
!     exec_normal(FALSE, FALSE);
  }
  
  /*
   * Execute normal_cmd() until there is no typeahead left.
   */
      void
! exec_normal(int was_typed, 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)
      {
  	update_topline_cursor();
  #ifdef FEAT_TERMINAL
--- 10471,10494 ----
  {
      /* Stuff the argument into the typeahead buffer. */
      ins_typebuf(cmd, remap, 0, TRUE, silent);
!     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 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)
! 		|| (use_vpeekc && vpeekc() != NUL))
! 	    && !got_int)
      {
  	update_topline_cursor();
  #ifdef FEAT_TERMINAL
*** ../vim-8.1.0446/src/proto/ex_docmd.pro	2018-09-15 15:42:36.501547749 +0200
--- src/proto/ex_docmd.pro	2018-10-02 16:21:31.332084040 +0200
***************
*** 59,65 ****
  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);
  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);
--- 59,65 ----
  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 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);
*** ../vim-8.1.0446/src/version.c	2018-10-02 15:06:36.761478333 +0200
--- src/version.c	2018-10-02 16:22:59.479443571 +0200
***************
*** 794,795 ****
--- 794,797 ----
  {   /* Add new patch number below this line */
+ /**/
+     447,
  /**/

-- 
Birthdays are healthy.  The more you have them, the longer you live.

 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///