Mercurial > vim
diff src/ex_docmd.c @ 14871:f20df682c8af v8.1.0447
patch 8.1.0447: GUI scrollbar test fails with Athena and Motif
commit https://github.com/vim/vim/commit/586c70cdfede55a166e3564f1cb68a299d81987d
Author: Bram Moolenaar <Bram@vim.org>
Date: Tue Oct 2 16:23:58 2018 +0200
patch 8.1.0447: GUI scrollbar test fails with Athena and Motif
Problem: GUI scrollbar test fails with Athena and Motif.
Solution: When not using on-the-fly scrolling call normal_cmd().
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Tue, 02 Oct 2018 16:30:05 +0200 |
parents | 27b9a84395b5 |
children | 405309f9dd13 |
line wrap: on
line diff
--- a/src/ex_docmd.c +++ b/src/ex_docmd.c @@ -10471,21 +10471,24 @@ exec_normal_cmd(char_u *cmd, int remap, { /* 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