Sometimes (maybe when scrolling occurs) undo messages like
"2 fewer lines: before #79 7 seconds ago" are not shown.
(Vim 7.4.041 on Windows, 7.3.429 on Linux)
E.g.
1. $ gvim -N -u NONE -U NONE
2. Input a line: `ifoo<CR><Esc>`.
3. Repeat it more than 25 times (= more than the screen lines) using `.`.
4. Go to the first line using `gg`, then undo by using `u`.
Undo message will not be shown.
5. Repeat `ggu` several times.
Undo message will be shown if the file lines becomes fewer than the screen
lines.
Attached patch seems to fix this, but I'm not sure this is the best way.
Regards,
Ken Takata
2013/10/02 Wed 19:52:29 UTC+9 Bram Moolenaar wrote:
> Ken Takata wrote:
>
> > Hi,
> >
> > Sometimes (maybe when scrolling occurs) undo messages like
> > "2 fewer lines: before #79 7 seconds ago" are not shown.
> > (Vim 7.4.041 on Windows, 7.3.429 on Linux)
> >
> > E.g.
> >
> > 1. $ gvim -N -u NONE -U NONE
> > 2. Input a line: `ifoo<CR><Esc>`.
> > 3. Repeat it more than 25 times (= more than the screen lines) using `.`.
> > 4. Go to the first line using `gg`, then undo by using `u`.
> > Undo message will not be shown.
> > 5. Repeat `ggu` several times.
> > Undo message will be shown if the file lines becomes fewer than the screen
> > lines.
> >
> > Attached patch seems to fix this, but I'm not sure this is the best way.
>
> No, this forces a redraw of the whole screen. It works because instead
> of deleting lines, which causes the message to scroll up and be cleared,
> it overwrites the screen.
>
> It's better to find a way to fill keep_msg. Unfortunately there is no
> asy way to call smsg() and have msg_attr_keep() called with "keep" set
> to TRUE. A global variable would be the easyest, but it's ugly.
Then I think it's better to add a new function smsg_attr_keep().
Please check the attached patch.
BTW, Yukihiro Nakadaira found an easier way to reproduce the problem:
$ vim -u NONE -N
Ofoo<Esc>..uuu
Now we don't need to repeat `.` 25 times ;-)
Regards,
Ken Takata