Hello VIM developers,

I'd like to report a bug that occurs when a very long ex command is entered, so 
that the GUI / console screen space isn't sufficient to display the complete 
command.

I have an external VBScript that uses the VIM OLE SendKeys() function (or 
WshShell.SendKeys() as a fallback) to open a list of files in VIM via:
     :drop file1 file2 C:/Program\ Files/this_is_a_very_very_very_long_filename
If the list of files is longer than the available space for the ex command, the 
characters that didn't fit in are appended in reversed order:
     :args
     [file1] file2 C:/Program\ Fiemanelif_gnol_yrev_yrev_yrev_a_si_siht/sel
                                 ^ BUG: reversed string!!!                ^

This happens:
- both in GVIM and console VIM
- on Windows and Linux
- through OLE SendKeys(), VIM's feedkeys(<string>,'t'), or by manually typing 
the string
- in VIM 7.1.311 until back to VIM 6.0
Probably, this is due to some bad pointer increment, which is hopefully easy to 
fix.

Steps to reproduce:
-------------------
vim -N -u NONE
" Limit window size to minimize typing until overflow :-)
:set columns=20 lines=4
:drop 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 
1234567890 1234567890
" Enlarge again to better see the output (optional).
:set columns=80
:args
[1234567890] 1234567890 1234567890 1234567890 1234567890 1234567890 
12345670987654321 098
" Note the garbled strings at the end!

You can also reproduce without resizing via feedkeys():
gvim -N -u NONE
call feedkeys(':drop ', 't') | for i in range(1,500) | call 
feedkeys('1234567890 
', 't') | endfor | call feedkeys("\<CR>", 't')
:args

-- kind regards, ingo

/^-- Ingo Karkat -- /^-- /^-- /^-- /^-- /^-- /^-- http://ingo-karkat.de/ --

                     Me?  A skeptic?  I trust you have proof.

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_dev" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Raspunde prin e-mail lui