From 23c347c66b91ba9fe1684af202fa32956352c912 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar <Bram@vim.org> Date: Wed, 14 Jul 2010 20:57:00 +0200 Subject: [PATCH] Fix: cursor line not properly concealed when moving between windows. (Vince Negri) --- runtime/doc/todo.txt | 8 +++++--- src/window.c | 11 +++++++++++ 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/runtime/doc/todo.txt b/runtime/doc/todo.txt index cab1148e98..1797972dfa 100644 --- a/runtime/doc/todo.txt +++ b/runtime/doc/todo.txt @@ -1091,12 +1091,10 @@ Patch to support horizontal scroll wheel in GTK. Untested. (Bjorn Winckler, Before (beta) release 7.3: - Add fixes for 7.2 to version7.txt - Add hg history to version7.txt +- Remove UF_VERSION_CRYPT_PREV and UF_VERSION_PREV. - Rename vim73 branch to default (hints: Xavier de Gaye, 2010 May 23) Vim 7.3: -- Soon: remove UF_VERSION_CRYPT_PREV and UF_VERSION_PREV. -- Conceal feature: no update when moving to another window. (Dominique Pelle, - 2010 Jul 5) Vince will look into it. Patches to possibly include: - Add different highlighting for a fold line depending on the fold level. Patch. (Noel Henson, 2009 Sep 13) @@ -3954,6 +3952,10 @@ Undo: was changed outside of Vim. Would require doing a diff between the buffer text and the file and storing the differences. + Alternative: before reloading a buffer, store it somewhere. Keep a list + of about 10 last reloaded buffers. + OR: before unloading, write a backup file with the current text, as if + doing ":w" twice before reloading. - Make it possible to undo all the commands from a mapping, including a trailing unfinished command, e.g. for ":map K iX^[r". - When accidentally hitting "R" instead of Ctrl-R, further Ctrl-R is not diff --git a/src/window.c b/src/window.c index 2c780dfb5c..5a5ae6cb67 100644 --- a/src/window.c +++ b/src/window.c @@ -3877,6 +3877,10 @@ tabpage_move(nr) win_goto(wp) win_T *wp; { +#ifdef FEAT_CONCEAL + win_T *owp = curwin; +#endif + if (text_locked()) { beep_flush(); @@ -3899,6 +3903,13 @@ win_goto(wp) need_mouse_correct = TRUE; #endif win_enter(wp, TRUE); + +#ifdef FEAT_CONCEAL + /* Conceal cursor line in previous window, unconceal in current window. */ + if (win_valid(owp)) + update_single_line(owp, owp->w_cursor.lnum); + update_single_line(curwin, curwin->w_cursor.lnum); +#endif } #if defined(FEAT_PERL) || defined(PROTO) -- GitLab