Possible bug when side scrolling

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Possible bug when side scrolling

JohnBeckett
In the following, these Unicode characters are used:
  "\u200e" = 'LEFT-TO-RIGHT MARK' (U+200E)
  "\u2013" = 'EN DASH' (U+2013)

On my 7.2.411 system, the following commands show a bug:

gvim -u NONE
:set columns=96 nowrap encoding=utf-8
:$put =repeat('a',50) . nr2char(0x200e) . repeat('b',40) . 'ABCDE'

The first command sets some options that I have in my vimrc.
The second command appends a line of 96 characters.
Press $ to jump to the last character of that line ('E').
Note that cursor is positioned a few characters AFTER 'E'.
Type ga to view code for character under cursor ('E').
Type FA (go back to 'A') to show a similar problem.
Enter ':set columns=80' then press $ (result: works ok).

If replace 0x200e with 0x2013, there is no problem.

I imagine the code for side scrolling is not accounting for
the fact that U+200E is displayed as <200e> (six characters).

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
Reply | Threaded
Open this post in threaded view
|

Re: Possible bug when side scrolling

Lech Lorens
On 06-May-2010 John Beckett <[hidden email]> wrote:
> In the following, these Unicode characters are used:
>   "\u200e" = 'LEFT-TO-RIGHT MARK' (U+200E)
>   "\u2013" = 'EN DASH' (U+2013)
>
> On my 7.2.411 system, the following commands show a bug:

Just wanted to confirm that I can see the problem both in Vim in xterm
and in Athena-based Gvim.

--
Cheers,
Lech

--
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
Reply | Threaded
Open this post in threaded view
|

Re: Possible bug when side scrolling

Bram Moolenaar
In reply to this post by JohnBeckett

John Becket wrote:

> In the following, these Unicode characters are used:
>   "\u200e" = 'LEFT-TO-RIGHT MARK' (U+200E)
>   "\u2013" = 'EN DASH' (U+2013)
>
> On my 7.2.411 system, the following commands show a bug:
>
> gvim -u NONE
> :set columns=96 nowrap encoding=utf-8
> :$put =repeat('a',50) . nr2char(0x200e) . repeat('b',40) . 'ABCDE'
>
> The first command sets some options that I have in my vimrc.
> The second command appends a line of 96 characters.
> Press $ to jump to the last character of that line ('E').
> Note that cursor is positioned a few characters AFTER 'E'.
> Type ga to view code for character under cursor ('E').
> Type FA (go back to 'A') to show a similar problem.
> Enter ':set columns=80' then press $ (result: works ok).
>
> If replace 0x200e with 0x2013, there is no problem.
>
> I imagine the code for side scrolling is not accounting for
> the fact that U+200E is displayed as <200e> (six characters).

I can reproduce it.  One more for the todo list.

--
If Pacman had affected us as kids we'd be running around in dark rooms,
munching pills and listening to repetitive music.
                       -- Marcus Brigstocke

 /// Bram Moolenaar -- [hidden email] -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\        download, build and distribute -- http://www.A-A-P.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