Re: Bug with screen redraw introduced by 7.1.329

2012-08-19 Fir de Conversatie Bram Moolenaar

Jon Long wrote:

 I recently encountered the issue described below, namely that vim
 always redraws the previous character when using utf8 starting with
 version 7.1.329.
 
 The purpose of the patch which created this issue was to ensure that
 the right half of double-width (two cell) characters was always
 redrawn after being obstructed (e.g., by popup menus). However, the
 fix seems to redraw _any_ character whenever the right-adjacent one
 changes.
 
 I've attached a patch which fixes this issue by checking that
 characters are actually double-width before deciding to redraw them
 when their right-adjacent partners change. I've checked that this
 preserves the functionality of the original patch (the right half of a
 double-width character is still redrawn after being obstructed by a
 popup menu) while preventing single-width characters from being always
 redrawn.

Thanks for the patch.

You drop the cols  1 condition, was that intentional?


-- 
Place mark here -[ ]- if you want a dirty monitor.

 /// Bram Moolenaar -- b...@moolenaar.net -- 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


Re: Bug with screen redraw introduced by 7.1.329

2012-08-19 Fir de Conversatie Jon Long
On Sunday, August 19, 2012 3:28:35 AM UTC-7, Bram Moolenaar wrote:
 Jon Long wrote:
 
 
 
  I recently encountered the issue described below, namely that vim
 
  always redraws the previous character when using utf8 starting with
 
  version 7.1.329.
 
  
 
  The purpose of the patch which created this issue was to ensure that
 
  the right half of double-width (two cell) characters was always
 
  redrawn after being obstructed (e.g., by popup menus). However, the
 
  fix seems to redraw _any_ character whenever the right-adjacent one
 
  changes.
 
  
 
  I've attached a patch which fixes this issue by checking that
 
  characters are actually double-width before deciding to redraw them
 
  when their right-adjacent partners change. I've checked that this
 
  preserves the functionality of the original patch (the right half of a
 
  double-width character is still redrawn after being obstructed by a
 
  popup menu) while preventing single-width characters from being always
 
  redrawn.
 
 
 
 Thanks for the patch.
 
 
 
 You drop the cols  1 condition, was that intentional?
 
 
 

Yes. The call to mb_off2cells (which is actually utf_off2cells in this case) 
checks the equivalent condition off_from + 1  off_from + cols.

Jon Long

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


Re: Bug with screen redraw introduced by 7.1.329

2012-08-18 Fir de Conversatie Jon Long
I recently encountered the issue described below, namely that vim always 
redraws the previous character when using utf8 starting with version 7.1.329.

The purpose of the patch which created this issue was to ensure that the right 
half of double-width (two cell) characters was always redrawn after being 
obstructed (e.g., by popup menus). However, the fix seems to redraw _any_ 
character whenever the right-adjacent one changes.

I've attached a patch which fixes this issue by checking that characters are 
actually double-width before deciding to redraw them when their right-adjacent 
partners change. I've checked that this preserves the functionality of the 
original patch (the right half of a double-width character is still redrawn 
after being obstructed by a popup menu) while preventing single-width 
characters from being always redrawn.

Thanks,
Jon Long

On Tuesday, September 2, 2008 9:35:07 PM UTC-7, tyler wrote:
 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1
 
 hello. I have noticed that starting from 7.1.329, using vim in the
 console with the encoding set
 to utf8, there is a bug with redrawing characters.
 The characters show up on the screen fine (at least to my screen reader), but 
 my
 screen reader is reading out the character that I type,
 then the one before the one I just typed, then the one I typed again.
 for example, I type 12345. On the 2, it says
 1 12. 3 says 2 23, etc.
 if I comment out these lines that were changed by the patch, it works fine:
   || (cols  1  ScreenLines[off_from + 1]
!= ScreenLines[off_to + 1])))
 
 I've confirmed this also effects 7.2.009.
 
 I'm not sure, but while we're on the subject of redraw bugs,
 every character I type on the command line, e.g. :12345, causes the
 command line to be redrawn. Is there a quick fix for this one also?
 I'm running vim on Linux. If
 you need any other information, I can provide it.
 
 Thanks,
 Tyler
 -BEGIN PGP SIGNATURE-
 Version: GnuPG v1.4.9 (GNU/Linux)
 
 iEYEARECAAYFAki+E/sACgkQTsjaYASMWKRrDQCfSHyc4keKJjUZjHxhMkTNYnQS
 U48AoKzZvku9bXwkKx5M3UynutosmqhR
 =DS2F
 -END PGP SIGNATURE-

-- 
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
*** src/screen.c	2012-08-18 18:36:36.635665817 -0700
--- src/my_screen.c	2012-08-18 18:43:17.479678374 -0700
***
*** 5332,5339 
  		 (ScreenLinesUC[off_from] != ScreenLinesUC[off_to]
  			|| (ScreenLinesUC[off_from] != 0
  			 comp_char_differs(off_from, off_to))
! 			|| (cols  1  ScreenLines[off_from + 1]
! 		 != ScreenLines[off_to + 1])))
  #endif
  	   ))
  	return TRUE;
--- 5332,5340 
  		 (ScreenLinesUC[off_from] != ScreenLinesUC[off_to]
  			|| (ScreenLinesUC[off_from] != 0
  			 comp_char_differs(off_from, off_to))
! 			|| ((*mb_off2cells)(off_from, off_from + cols)  1)
! 			 ScreenLines[off_from + 1]
! 			   != ScreenLines[off_to + 1]))
  #endif
  	   ))
  	return TRUE;


Re: Bug with screen redraw introduced by 7.1.329

2008-09-11 Fir de Conversatie Tyler Spivey

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On Thu, Sep 04, 2008 at 10:09:07PM +0200, Bram Moolenaar wrote:
 
 Tyler Spivey wrote:
 
  hello. I have noticed that starting from 7.1.329, using vim in the
  console with the encoding set
  to utf8, there is a bug with redrawing characters.
  The characters show up on the screen fine (at least to my screen
  reader), but my screen reader is reading out the character that I
  type, then the one before the one I just typed, then the one I typed
  again.  for example, I type 12345. On the 2, it says
  1 12. 3 says 2 23, etc.
  if I comment out these lines that were changed by the patch, it works fine:
  || (cols  1  ScreenLines[off_from + 1]
   != ScreenLines[off_to + 1])))
  
  I've confirmed this also effects 7.2.009.
 
 That condition is needed for when the right halve of a double-wide
 character is drawn over any character that used to be there.  We can't
 simply remove it.
 
 Are you typing this at the end of the line, not pushing any characters
 forward?  And those numbers are really ASCII digits?
These are ascii digits, and I'm at the end of the line.
 
  I'm not sure, but while we're on the subject of redraw bugs,
  every character I type on the command line, e.g. :12345, causes the
  command line to be redrawn. Is there a quick fix for this one also?
  I'm running vim on Linux. If
  you need any other information, I can provide it.
 
 That might be difficult to change.  But I don't see this happening.  Do
 you have any special settings?  Try resetting 'arabicshape', as Ingo
 suggested.
I don't have any special settings other than:
set noruler
set noshowcmd
filetype on
set noarabicshape
The set noarabicshape helped with the command line, so that one is solved. The 
only remaining one is the
editor itself, which I have no idea how to fix. 

P.S.: Sorry if the quoting is a little strange; I've always top-posted, but 
figured I could give this a shot.
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (GNU/Linux)

iEYEARECAAYFAkjJna0ACgkQTsjaYASMWKRGxwCbBJ9cBKWp6m1Tmi4BgDGYACU+
vYsAmwdSTZmLaQMn+eGECoIER7GNx30F
=E1ep
-END PGP SIGNATURE-

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



Re: Bug with screen redraw introduced by 7.1.329

2008-09-04 Fir de Conversatie Bram Moolenaar


Tyler Spivey wrote:

 hello. I have noticed that starting from 7.1.329, using vim in the
 console with the encoding set
 to utf8, there is a bug with redrawing characters.
 The characters show up on the screen fine (at least to my screen
 reader), but my screen reader is reading out the character that I
 type, then the one before the one I just typed, then the one I typed
 again.  for example, I type 12345. On the 2, it says
 1 12. 3 says 2 23, etc.
 if I comment out these lines that were changed by the patch, it works fine:
   || (cols  1  ScreenLines[off_from + 1]
!= ScreenLines[off_to + 1])))
 
 I've confirmed this also effects 7.2.009.

That condition is needed for when the right halve of a double-wide
character is drawn over any character that used to be there.  We can't
simply remove it.

Are you typing this at the end of the line, not pushing any characters
forward?  And those numbers are really ASCII digits?

 I'm not sure, but while we're on the subject of redraw bugs,
 every character I type on the command line, e.g. :12345, causes the
 command line to be redrawn. Is there a quick fix for this one also?
 I'm running vim on Linux. If
 you need any other information, I can provide it.

That might be difficult to change.  But I don't see this happening.  Do
you have any special settings?  Try resetting 'arabicshape', as Ingo
suggested.

-- 
The History of every major Galactic Civilization tends to pass through
three distinct and recognizable phases, those of Survival, Inquiry and
Sophistication, otherwise known as the How, Why and Where phases.
For instance, the first phase is characterized by the question 'How can
we eat?' the second by the question 'Why do we eat?' and the third by
the question 'Where shall we have lunch?'
-- Douglas Adams, The Hitchhiker's Guide to the Galaxy

 /// Bram Moolenaar -- [EMAIL PROTECTED] -- 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.
For more information, visit http://www.vim.org/maillist.php
-~--~~~~--~~--~--~---



Re: Bug with screen redraw introduced by 7.1.329

2008-09-04 Fir de Conversatie Matt Wozniski

On Thu, Sep 4, 2008 at 4:09 PM, Bram Moolenaar wrote:

 Tyler Spivey wrote:

 hello. I have noticed that starting from 7.1.329, using vim in the
 console with the encoding set
 to utf8, there is a bug with redrawing characters.
 The characters show up on the screen fine (at least to my screen
 reader), but my screen reader is reading out the character that I
 type, then the one before the one I just typed, then the one I typed
 again.  for example, I type 12345. On the 2, it says
 1 12. 3 says 2 23, etc.
 if I comment out these lines that were changed by the patch, it works fine:
   || (cols  1  ScreenLines[off_from + 1]
!= ScreenLines[off_to + 1])))

 I've confirmed this also effects 7.2.009.

 That condition is needed for when the right halve of a double-wide
 character is drawn over any character that used to be there.  We can't
 simply remove it.

 Are you typing this at the end of the line, not pushing any characters
 forward?  And those numbers are really ASCII digits?

I can confirm this.  The numbers are really ASCII digits being added at EOL.

 I'm not sure, but while we're on the subject of redraw bugs,
 every character I type on the command line, e.g. :12345, causes the
 command line to be redrawn. Is there a quick fix for this one also?
 I'm running vim on Linux. If
 you need any other information, I can provide it.

 That might be difficult to change.  But I don't see this happening.  Do
 you have any special settings?  Try resetting 'arabicshape', as Ingo
 suggested.

I can reproduce this one as well, and can also confirm that resetting
'arabicshape' seems to fix it.

~Matt

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



Bug with screen redraw introduced by 7.1.329

2008-09-03 Fir de Conversatie Tyler Spivey

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

hello. I have noticed that starting from 7.1.329, using vim in the
console with the encoding set
to utf8, there is a bug with redrawing characters.
The characters show up on the screen fine (at least to my screen reader), but my
screen reader is reading out the character that I type,
then the one before the one I just typed, then the one I typed again.
for example, I type 12345. On the 2, it says
1 12. 3 says 2 23, etc.
if I comment out these lines that were changed by the patch, it works fine:
|| (cols  1  ScreenLines[off_from + 1]
 != ScreenLines[off_to + 1])))

I've confirmed this also effects 7.2.009.

I'm not sure, but while we're on the subject of redraw bugs,
every character I type on the command line, e.g. :12345, causes the
command line to be redrawn. Is there a quick fix for this one also?
I'm running vim on Linux. If
you need any other information, I can provide it.

Thanks,
Tyler
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (GNU/Linux)

iEYEARECAAYFAki+E/sACgkQTsjaYASMWKRrDQCfSHyc4keKJjUZjHxhMkTNYnQS
U48AoKzZvku9bXwkKx5M3UynutosmqhR
=DS2F
-END PGP SIGNATURE-

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



Re: Bug with screen redraw introduced by 7.1.329

2008-09-03 Fir de Conversatie Ingo Karkat

On 03-Sep-08 6:35, Tyler Spivey wrote:
 I'm not sure, but while we're on the subject of redraw bugs,
 every character I type on the command line, e.g. :12345, causes the
 command line to be redrawn. Is there a quick fix for this one also?
 I'm running vim on Linux. If
 you need any other information, I can provide it.
 
 Thanks,
 Tyler

Do you use the big or huge version of VIM? The 'rightleft' feature, which is 
enabled in the big version, causes these redraws. See this comment in 
src/ex_getln.c:
 /* Always redraw the whole command line to fix shaping and
  * right-left typing.  Not efficient, but it works. */
 redrawcmd();
Unless you're volunteering to improve the 'rightleft' implementation, you could 
use the normal version or compile a custom VIM without the 'rightleft' feature.

-- regards, ingo

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