Patch 8.2.3444
Problem: concealed text not revealed when leaving insert mode. (Michael
Soyka)
Solution: Check if concealing changed when leaving insert mode.
(closes #8880)
Files: src/edit.c, src/testdir/test_conceal.vim,
src/testdir/dumps/Test_conceal_two_windows_07in.dump
*** ../vim-8.2.3443/src/edit.c 2021-09-12 13:39:04.323467415 +0200
--- src/edit.c 2021-09-16 22:29:15.859169933 +0200
***************
*** 3582,3587 ****
--- 3582,3592 ----
{
int temp;
static int disabled_redraw = FALSE;
+ #ifdef FEAT_CONCEAL
+ // Remember if the cursor line was concealed before changing State.
+ int cursor_line_was_concealed = curwin->w_p_cole > 0
+ && conceal_cursor_line(curwin);
+ #endif
#ifdef FEAT_SPELL
check_spell_redraw();
***************
*** 3701,3706 ****
--- 3706,3716 ----
// Re-enable modifyOtherKeys.
out_str(T_CTI);
}
+ #ifdef FEAT_CONCEAL
+ // Check if the cursor line needs redrawing after changing State. If
+ // 'concealcursor' is "i" it needs to be redrawn without concealing.
+ conceal_check_cursor_line(cursor_line_was_concealed);
+ #endif
// When recording or for CTRL-O, need to display the new mode.
// Otherwise remove the mode message.
*** ../vim-8.2.3443/src/testdir/test_conceal.vim 2020-06-25
22:23:45.089461529 +0200
--- src/testdir/test_conceal.vim 2021-09-16 22:26:44.331326337 +0200
***************
*** 59,67 ****
" Check that with cursor line is only concealed in Insert mode
call term_sendkeys(buf, ":set concealcursor=i\r")
call VerifyScreenDump(buf, 'Test_conceal_two_windows_07n', {})
! call term_sendkeys(buf, "a")
call VerifyScreenDump(buf, 'Test_conceal_two_windows_07i', {})
! call term_sendkeys(buf, "\<Esc>/e")
call VerifyScreenDump(buf, 'Test_conceal_two_windows_07c', {})
call term_sendkeys(buf, "\<Esc>v")
call VerifyScreenDump(buf, 'Test_conceal_two_windows_07v', {})
--- 59,69 ----
" Check that with cursor line is only concealed in Insert mode
call term_sendkeys(buf, ":set concealcursor=i\r")
call VerifyScreenDump(buf, 'Test_conceal_two_windows_07n', {})
! call term_sendkeys(buf, "14|a")
call VerifyScreenDump(buf, 'Test_conceal_two_windows_07i', {})
! call term_sendkeys(buf, "\<Esc>")
! call VerifyScreenDump(buf, 'Test_conceal_two_windows_07in', {})
! call term_sendkeys(buf, "/e")
call VerifyScreenDump(buf, 'Test_conceal_two_windows_07c', {})
call term_sendkeys(buf, "\<Esc>v")
call VerifyScreenDump(buf, 'Test_conceal_two_windows_07v', {})
*** ../vim-8.2.3443/src/testdir/dumps/Test_conceal_two_windows_07in.dump
2021-09-16 22:30:32.691091284 +0200
--- src/testdir/dumps/Test_conceal_two_windows_07in.dump 2021-09-16
22:26:50.783319646 +0200
***************
*** 0 ****
--- 1,20 ----
+ |o+0&#ffffff0|n|e| |o|n|e| |o|n|e| |o|n|e| |o|n|e| @55
+ |t|w|o| @1|h|e|r|e| @65
+ |t|h|r|e@1| @1|t|h|r|e@1| @62
+ |S|e|c|o|n|d| |w|i|n|d|o|w| @61
+ |~+0#4040ff13&| @73
+ |~| @73
+ |~| @73
+ |~| @73
+ |~| @73
+ |[+1#0000000&|N|o| |N|a|m|e|]| |[|+|]| @43|3|,|1|4| @10|A|l@1
+ |o+0&&|n|e| |o|n|e| |o|n|e| |o|n|e| |o|n|e| @55
+ |t|w|o| |||h|i|d@1|e|n||| >h|e|r|e| @57
+ |t|h|r|e@1| @1|t|h|r|e@1| @62
+ |~+0#4040ff13&| @73
+ |~| @73
+ |~| @73
+ |~| @73
+ |~| @73
+ |[+3#0000000&|N|o| |N|a|m|e|]| |[|+|]| @43|2|,|1|4| @10|A|l@1
+ | +0&&@74
*** ../vim-8.2.3443/src/version.c 2021-09-16 20:14:46.807034740 +0200
--- src/version.c 2021-09-16 22:23:21.843538706 +0200
***************
*** 757,758 ****
--- 757,760 ----
{ /* Add new patch number below this line */
+ /**/
+ 3444,
/**/
--
"You know, it's at times like this when I'm trapped in a Vogon airlock with
a man from Betelgeuse and about to die of asphyxiation in deep space that I
really wish I'd listened to what my mother told me when I was young!"
"Why, what did she tell you?"
"I don't know, I didn't listen!"
-- Arthur Dent and Ford Prefect in 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/ ///
\\\ 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/202109162032.18GKWlIe2020280%40masaka.moolenaar.net.