Patch 9.0.0720
Problem: MS-Windows GUI may have pixel dust from antialiasing.
Solution: When a character changes also redraw the next one. (issue #8532)
Files: src/screen.c
*** ../vim-9.0.0719/src/screen.c 2022-10-04 14:34:42.112964811 +0100
--- src/screen.c 2022-10-11 12:44:30.418979060 +0100
***************
*** 475,480 ****
--- 475,484 ----
#endif
;
int redraw_next; // redraw_this for next
character
+ #ifdef FEAT_GUI_MSWIN
+ int changed_this; // TRUE if character changed
+ int changed_next; // TRUE if next character
changed
+ #endif
int clear_next = FALSE;
int char_cells; // 1: normal char
// 2: occupies two display cells
***************
*** 534,539 ****
--- 538,546 ----
#endif
redraw_next = char_needs_redraw(off_from, off_to, endcol - col);
+ #ifdef FEAT_GUI_MSWIN
+ changed_next = redraw_next;
+ #endif
while (col < endcol)
{
***************
*** 547,561 ****
--- 554,577 ----
off_to + char_cells, endcol - col - char_cells);
#ifdef FEAT_GUI
+ # ifdef FEAT_GUI_MSWIN
+ changed_this = changed_next;
+ changed_next = redraw_next;
+ # endif
// If the next character was bold, then redraw the current character to
// remove any pixels that might have spilt over into us. This only
// happens in the GUI.
+ // With MS-Windows antialiasing may also cause pixels to spill over
+ // from a previous character, no matter attributes, always redraw if a
+ // character changed.
if (redraw_next && gui.in_use)
{
+ # ifndef FEAT_GUI_MSWIN
hl = ScreenAttrs[off_to + char_cells];
if (hl > HL_ALL)
hl = syn_attr2attr(hl);
if (hl & HL_BOLD)
+ # endif
redraw_this = TRUE;
}
#endif
***************
*** 689,694 ****
--- 705,716 ----
redraw_next = TRUE;
}
#endif
+ #ifdef FEAT_GUI_MSWIN
+ // MS-Windows antialiasing may spill over to the next character,
+ // redraw that one if this one changed, no matter attributes.
+ if (gui.in_use && changed_this)
+ redraw_next = TRUE;
+ #endif
ScreenAttrs[off_to] = ScreenAttrs[off_from];
// For simplicity set the attributes of second half of a
*** ../vim-9.0.0719/src/version.c 2022-10-10 22:39:38.207545888 +0100
--- src/version.c 2022-10-11 12:45:41.315067125 +0100
***************
*** 701,702 ****
--- 701,704 ----
{ /* Add new patch number below this line */
+ /**/
+ 720,
/**/
--
ARTHUR: Be quiet!
DENNIS: --but by a two-thirds majority in the case of more--
ARTHUR: Be quiet! I order you to be quiet!
WOMAN: Order, eh -- who does he think he is?
ARTHUR: I am your king!
The Quest for the Holy Grail (Monty Python)
/// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net \\\
/// \\\
\\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
\\\ 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].
To view this discussion on the web visit
https://groups.google.com/d/msgid/vim_dev/20221011114928.60A4C1C5298%40moolenaar.net.