331576717 / vim

Automatically exported from code.google.com/p/vim
0 stars 0 forks source link

Console prompts fail to reset the console pager #14

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Example reproduction steps:
1. Open several files in one copy of vim; for example: vim *.c
2. While the first copy is running, open the same files in another copy of vim; 
in another terminal window, for example.
3. Hit "o" at each swap file prompt, and the spacebar at each "-- More --" 
prompt.

The "-- More --" prompt currently shows up far too often, about every three 
files on a large screen.  I expect the swap file prompt to count as having 
allowed me to see the lines on the screen.

This occurs on every copy of vim I've tried; in particular, it happens in 
Ubuntu 10.10's pre-packaged 7.2 (2:7.2.330-1ubuntu4), both gui and console, and 
in hand-built console versions from the Mercurial repository: vim72 branch 
(v7-2-446) and default branch (v7-3-230).

The attached patch attempts to fix the issue for all console prompts, by 
resetting lines_left in msg_end_prompt().  This has been verified to fix the 
swap file prompt for both Mercurial heads, but has not been tested for other 
types of console prompts, nor for gui prompts.

Original issue reported on code.google.com by esw...@gmail.com on 22 Jun 2011 at 9:26

Attachments:

GoogleCodeExporter commented 9 years ago
Confirmed that the patch also works for the "File [...] has changed since 
editing started" prompt.

1. Open many files in vim, at least one-third as many as you have text rows 
available; for example: `vim *.c`
2. Suspend vim: ^Z (or for gvim, simply switch focus to another window.
3. Change all of the open files somehow.  (Simply touching them is 
insufficient.)  For example, `for file in *.c; echo '' | $file`
4. Resume vim: `fg`
5. Hit "o" or "l" at each file changed prompt, and the spacebar at each "-- 
More --" prompt.

Again, I expect the file changed prompt to count as having let me see the 
message lines, without the need for extra More prompts.  The patch eliminates 
the latter for this case.

This case also comes up, for example, when switching git branches in a large 
project.

Original comment by esw...@gmail.com on 15 Jul 2011 at 4:08

GoogleCodeExporter commented 9 years ago
Patch 7.3.389

Original comment by brammool...@gmail.com on 30 Dec 2011 at 1:10