comparison src/screen.c @ 26771:fc859aea8cec v8.2.3914

patch 8.2.3914: various spelling mistakes in comments Commit: https://github.com/vim/vim/commit/af4a61a85d6e8cacc35324f266934bc463a21673 Author: Dominique Pelle <dominique.pelle@gmail.com> Date: Mon Dec 27 17:21:41 2021 +0000 patch 8.2.3914: various spelling mistakes in comments Problem: Various spelling mistakes in comments. Solution: Fix the mistakes. (Dominique Pell?, closes https://github.com/vim/vim/issues/9416)
author Bram Moolenaar <Bram@vim.org>
date Mon, 27 Dec 2021 18:30:05 +0100
parents c75f70257cf5
children bce848ec8b1b
comparison
equal deleted inserted replaced
26770:15ff3f2e0d58 26771:fc859aea8cec
612 if (enc_dbcs == DBCS_JPNU) 612 if (enc_dbcs == DBCS_JPNU)
613 ScreenLines2[off_to] = ScreenLines2[off_from]; 613 ScreenLines2[off_to] = ScreenLines2[off_from];
614 } 614 }
615 // When writing a single-width character over a double-width 615 // When writing a single-width character over a double-width
616 // character and at the end of the redrawn text, need to clear out 616 // character and at the end of the redrawn text, need to clear out
617 // the right halve of the old character. 617 // the right half of the old character.
618 // Also required when writing the right halve of a double-width 618 // Also required when writing the right half of a double-width
619 // char over the left halve of an existing one. 619 // char over the left half of an existing one.
620 if (has_mbyte && col + char_cells == endcol 620 if (has_mbyte && col + char_cells == endcol
621 && ((char_cells == 1 621 && ((char_cells == 1
622 && (*mb_off2cells)(off_to, max_off_to) > 1) 622 && (*mb_off2cells)(off_to, max_off_to) > 1)
623 || (char_cells == 2 623 || (char_cells == 2
624 && (*mb_off2cells)(off_to, max_off_to) == 1 624 && (*mb_off2cells)(off_to, max_off_to) == 1
1522 || row >= screen_Rows || row < 0 1522 || row >= screen_Rows || row < 0
1523 || col >= screen_Columns || col < 0) 1523 || col >= screen_Columns || col < 0)
1524 return; 1524 return;
1525 off = LineOffset[row] + col; 1525 off = LineOffset[row] + col;
1526 1526
1527 // When drawing over the right halve of a double-wide char clear out the 1527 // When drawing over the right half of a double-wide char clear out the
1528 // left halve. Only needed in a terminal. 1528 // left half. Only needed in a terminal.
1529 if (has_mbyte && col > 0 && col < screen_Columns 1529 if (has_mbyte && col > 0 && col < screen_Columns
1530 #ifdef FEAT_GUI 1530 #ifdef FEAT_GUI
1531 && !gui.in_use 1531 && !gui.in_use
1532 #endif 1532 #endif
1533 && mb_fix_col(col, row) != col) 1533 && mb_fix_col(col, row) != col)
1651 force_redraw_next = TRUE; 1651 force_redraw_next = TRUE;
1652 } 1652 }
1653 #endif 1653 #endif
1654 // When at the end of the text and overwriting a two-cell 1654 // When at the end of the text and overwriting a two-cell
1655 // character with a one-cell character, need to clear the next 1655 // character with a one-cell character, need to clear the next
1656 // cell. Also when overwriting the left halve of a two-cell char 1656 // cell. Also when overwriting the left half of a two-cell char
1657 // with the right halve of a two-cell char. Do this only once 1657 // with the right half of a two-cell char. Do this only once
1658 // (mb_off2cells() may return 2 on the right halve). 1658 // (mb_off2cells() may return 2 on the right half).
1659 if (clear_next_cell) 1659 if (clear_next_cell)
1660 clear_next_cell = FALSE; 1660 clear_next_cell = FALSE;
1661 else if (has_mbyte 1661 else if (has_mbyte
1662 && (len < 0 ? ptr[mbyte_blen] == NUL 1662 && (len < 0 ? ptr[mbyte_blen] == NUL
1663 : ptr + mbyte_blen >= text + len) 1663 : ptr + mbyte_blen >= text + len)
2374 #ifdef FEAT_GUI 2374 #ifdef FEAT_GUI
2375 && !gui.in_use 2375 && !gui.in_use
2376 #endif 2376 #endif
2377 ) 2377 )
2378 { 2378 {
2379 // When drawing over the right halve of a double-wide char clear 2379 // When drawing over the right half of a double-wide char clear
2380 // out the left halve. When drawing over the left halve of a 2380 // out the left half. When drawing over the left half of a
2381 // double wide-char clear out the right halve. Only needed in a 2381 // double wide-char clear out the right half. Only needed in a
2382 // terminal. 2382 // terminal.
2383 if (start_col > 0 && mb_fix_col(start_col, row) != start_col) 2383 if (start_col > 0 && mb_fix_col(start_col, row) != start_col)
2384 screen_puts_len((char_u *)" ", 1, row, start_col - 1, 0); 2384 screen_puts_len((char_u *)" ", 1, row, start_col - 1, 0);
2385 if (end_col < screen_Columns && mb_fix_col(end_col, row) != end_col) 2385 if (end_col < screen_Columns && mb_fix_col(end_col, row) != end_col)
2386 screen_puts_len((char_u *)" ", 1, row, end_col, 0); 2386 screen_puts_len((char_u *)" ", 1, row, end_col, 0);