Christian Brabandt wrote:

> On Do, 07 Apr 2016, Christian Brabandt wrote:
> > Bram wrote:
> > 
> > > Can you give an explanation why this change is needed?
> > 
> > when reading the script, Vim finds the `À`,  whose second byte is the 80. 
> > And this is K_SPECIAL in Vim source and needs to be replaced by K_SPECIAL 
> > KS_SPECIAL KE_FILLER to be correctly parsed later in vgetorpeek when Vim 
> > sees the K_SPECIAL and increments the offset pointer of the typebuf struct 
> > by 2, thinking, that it needs to skip the next 2 special bytes. But since 
> > the K_SPECIAL has not been escaped correctly, it will skip two chars from 
> > the script file.
> > 
> > > When recording key strokes and playing them back, does that still work?
> > 
> > I will check and will try to create a test for that behaviour later when I 
> > come up with a proper patch.
> 
> Here is a patch, including a test.
> 
> I verified, that recording and replaying works as expected. 
> Unfortunately, replaying the macro does not work at all in the test and 
> I am not sure why. It fails however in the unpatched and patched version 
> the same way, so I assume, this is caused by the way the tests are 
> executed, because when running the test interactively, it works as 
> expected.

Thanks.

It probably requires some debugging to figure out the difference between
doing this interactively and from a test script.  Would be worth it,
when we add a few things specifically for testing we should be able to
improve test coverage and avoid errors in the future.


-- 
hundred-and-one symptoms of being an internet addict:
254. You wake up daily with your keyboard printed on your forehead.

 /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

-- 
-- 
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

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Raspunde prin e-mail lui