Bram wrote:
>> In function getcmdline() (file ex_getln.c line 1840) we find:
>> /* Always redraw the whole command line to fix shaping and
>> * right-left typing. Not efficient, but it works. */
>> redrawcmd();
>>
>> Removing that redrawcmd() makes accidental pastes of 8000
>> bytes into the command line occur in a second or so.
> ...
> The intention of this call to redrawcmd() was to only do this
> when the text has characters that are difficult to get right,
> such as Hebrew and Arabic. Unfortunately the option settings
> are now the default.
>
> I see two possible solutions:
> 1. Don't redraw when there is text pending, using
> char_avail(). Need to set a flag then and redraw later,
> before waiting for any character to be typed.
> 2. Don't redraw when the command line contains only "normal"
> characters.
> Either ASCII or perhaps only redraw when there are
> composing characters. Checking for Arabic is probably a bit
> too specific.
While it would best to eliminate the redundant redraws
altogether (and I'll perhaps have a chance to look at that after
7.3 is released), I was wondering what happens once echoing of
the command fills the screen. There seems to be a flag which
tells Vim to only redraw the last line once the screen fills,
and I thought that at least the paste problem might be avoided
if that flag were used to not redraw once the screen fills. The
redraw fails anyway; the last line is garbled, which you can see
if you run the following code to generate some consistent text,
then copy and paste that text into the command line (caution:
you may have to kill Vim to recover).
:new
:for i in range(1, 500)
: call append(line('$'), printf('%04d-abcdefghijklmn', i))
:endfor
The stress of all those redraws when pasting 10k characters
sometimes makes Vim crash. If Dominique notices this, perhaps he
could use some valgrind magic to see if something obvious needs
to be fixed.
John
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php