diff --git a/.mailmap b/.mailmap index 1aa9aa36d8..7e154b4644 100644 --- a/.mailmap +++ b/.mailmap @@ -8,7 +8,7 @@ Anmol Sethi BK1603 Shreyansh Chouhan Billy Su Billy SU Billy Vong -Björn Linse bfredl +bfredl Carlos Hernandez Chris Kipp ckipp01 Christian Clason diff --git a/src/nvim/screen.c b/src/nvim/screen.c index df87955c46..770099ab65 100644 --- a/src/nvim/screen.c +++ b/src/nvim/screen.c @@ -6463,6 +6463,9 @@ void showruler(bool always) } else { win_redr_ruler(curwin, always); } + if (*p_wbr != NUL || *curwin->w_p_wbr != NUL) { + win_redr_winbar(curwin); + } if (need_maketitle || (p_icon && (stl_syntax & STL_IN_ICON)) diff --git a/test/functional/ui/winbar_spec.lua b/test/functional/ui/winbar_spec.lua index af7736293c..83bc61bc4e 100644 --- a/test/functional/ui/winbar_spec.lua +++ b/test/functional/ui/winbar_spec.lua @@ -6,6 +6,7 @@ local insert = helpers.insert local meths = helpers.meths local eq = helpers.eq local poke_eventloop = helpers.poke_eventloop +local feed = helpers.feed describe('winbar', function() local screen @@ -148,6 +149,59 @@ describe('winbar', function() | ]]) end) + it('can be ruler', function() + insert [[ + just some + random text]] + meths.set_option('winbar', 'Hello, I am a ruler: %l,%c') + screen:expect{grid=[[ + {1:Hello, I am a ruler: 2,11 }| + just some | + random tex^t | + {3:~ }| + {3:~ }| + {3:~ }| + {3:~ }| + {3:~ }| + {3:~ }| + {3:~ }| + {3:~ }| + {3:~ }| + | + ]]} + feed 'b' + screen:expect{grid=[[ + {1:Hello, I am a ruler: 2,8 }| + just some | + random ^text | + {3:~ }| + {3:~ }| + {3:~ }| + {3:~ }| + {3:~ }| + {3:~ }| + {3:~ }| + {3:~ }| + {3:~ }| + | + ]]} + feed 'k' + screen:expect{grid=[[ + {1:Hello, I am a ruler: 1,8 }| + just so^me | + random text | + {3:~ }| + {3:~ }| + {3:~ }| + {3:~ }| + {3:~ }| + {3:~ }| + {3:~ }| + {3:~ }| + {3:~ }| + | + ]]} + end) it('works with laststatus=3', function() command('set laststatus=3') screen:expect([[