| To: vim_dev@googlegroups.com |
| Subject: Patch 7.3.181 |
| Fcc: outbox |
| From: Bram Moolenaar <Bram@moolenaar.net> |
| Mime-Version: 1.0 |
| Content-Type: text/plain; charset=UTF-8 |
| Content-Transfer-Encoding: 8bit |
| |
| |
| Patch 7.3.181 |
| Problem: When repeating the insert of CTRL-V or a digraph the display may |
| not be updated correctly. |
| Solution: Only call edit_unputchar() after edit_putchar(). (Lech Lorens) |
| Files: src/edit.c |
| |
| |
| |
| |
| |
| *** 1553,1564 **** |
| --- 1553,1568 ---- |
| ins_ctrl_v() |
| { |
| int c; |
| + int did_putchar = FALSE; |
| |
| /* may need to redraw when no more chars available now */ |
| ins_redraw(FALSE); |
| |
| if (redrawing() && !char_avail()) |
| + { |
| edit_putchar('^', TRUE); |
| + did_putchar = TRUE; |
| + } |
| AppendToRedobuff((char_u *)CTRL_V_STR); /* CTRL-V */ |
| |
| #ifdef FEAT_CMDL_INFO |
| |
| *** 1566,1573 **** |
| #endif |
| |
| c = get_literal(); |
| ! edit_unputchar(); /* when line fits in 'columns' the '^' is at the start |
| ! of the next line and will not be redrawn */ |
| #ifdef FEAT_CMDL_INFO |
| clear_showcmd(); |
| #endif |
| --- 1570,1579 ---- |
| #endif |
| |
| c = get_literal(); |
| ! if (did_putchar) |
| ! /* when the line fits in 'columns' the '^' is at the start of the next |
| ! * line and will not removed by the redraw */ |
| ! edit_unputchar(); |
| #ifdef FEAT_CMDL_INFO |
| clear_showcmd(); |
| #endif |
| |
| *** 9637,9642 **** |
| --- 9643,9649 ---- |
| { |
| int c; |
| int cc; |
| + int did_putchar = FALSE; |
| |
| pc_status = PC_STATUS_UNSET; |
| if (redrawing() && !char_avail()) |
| |
| *** 9645,9650 **** |
| --- 9652,9658 ---- |
| ins_redraw(FALSE); |
| |
| edit_putchar('?', TRUE); |
| + did_putchar = TRUE; |
| #ifdef FEAT_CMDL_INFO |
| add_to_showcmd_c(Ctrl_K); |
| #endif |
| |
| *** 9661,9668 **** |
| c = plain_vgetc(); |
| --no_mapping; |
| --allow_keys; |
| ! edit_unputchar(); /* when line fits in 'columns' the '?' is at the start |
| ! of the next line and will not be redrawn */ |
| |
| if (IS_SPECIAL(c) || mod_mask) /* special key */ |
| { |
| --- 9669,9678 ---- |
| c = plain_vgetc(); |
| --no_mapping; |
| --allow_keys; |
| ! if (did_putchar) |
| ! /* when the line fits in 'columns' the '?' is at the start of the next |
| ! * line and will not be removed by the redraw */ |
| ! edit_unputchar(); |
| |
| if (IS_SPECIAL(c) || mod_mask) /* special key */ |
| { |
| |
| *** 9674,9679 **** |
| --- 9684,9690 ---- |
| } |
| if (c != ESC) |
| { |
| + did_putchar = FALSE; |
| if (redrawing() && !char_avail()) |
| { |
| /* may need to redraw when no more chars available now */ |
| |
| *** 9681,9691 **** |
| |
| if (char2cells(c) == 1) |
| { |
| - /* first remove the '?', otherwise it's restored when typing |
| - * an ESC next */ |
| - edit_unputchar(); |
| ins_redraw(FALSE); |
| edit_putchar(c, TRUE); |
| } |
| #ifdef FEAT_CMDL_INFO |
| add_to_showcmd_c(c); |
| --- 9692,9700 ---- |
| |
| if (char2cells(c) == 1) |
| { |
| ins_redraw(FALSE); |
| edit_putchar(c, TRUE); |
| + did_putchar = TRUE; |
| } |
| #ifdef FEAT_CMDL_INFO |
| add_to_showcmd_c(c); |
| |
| *** 9696,9703 **** |
| cc = plain_vgetc(); |
| --no_mapping; |
| --allow_keys; |
| ! edit_unputchar(); /* when line fits in 'columns' the '?' is at the |
| ! start of the next line and will not be redrawn */ |
| if (cc != ESC) |
| { |
| AppendToRedobuff((char_u *)CTRL_V_STR); |
| --- 9705,9714 ---- |
| cc = plain_vgetc(); |
| --no_mapping; |
| --allow_keys; |
| ! if (did_putchar) |
| ! /* when the line fits in 'columns' the '?' is at the start of the |
| ! * next line and will not be removed by a redraw */ |
| ! edit_unputchar(); |
| if (cc != ESC) |
| { |
| AppendToRedobuff((char_u *)CTRL_V_STR); |
| |
| |
| |
| *** 716,717 **** |
| --- 716,719 ---- |
| { /* Add new patch number below this line */ |
| + /**/ |
| + 181, |
| /**/ |
| |
| -- |
| hundred-and-one symptoms of being an internet addict: |
| 74. Your most erotic dreams are about cybersex |
| |
| /// Bram Moolenaar -- Bram@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 /// |