mirror of
https://github.com/neovim/neovim.git
synced 2025-10-10 03:46:31 +00:00
api: ignore floating windows for laststatus=1 (#9771)
ONE_WINDOW considers all windows whereas one_window() ignores floating windows. Fixes https://github.com/neovim/neovim/issues/9768
This commit is contained in:
@@ -5788,7 +5788,7 @@ last_status (
|
||||
{
|
||||
/* Don't make a difference between horizontal or vertical split. */
|
||||
last_status_rec(topframe, (p_ls == 2
|
||||
|| (p_ls == 1 && (morewin || !ONE_WINDOW))));
|
||||
|| (p_ls == 1 && (morewin || !one_window()))));
|
||||
}
|
||||
|
||||
static void last_status_rec(frame_T *fr, int statusline)
|
||||
|
@@ -209,7 +209,7 @@ describe('floating windows', function()
|
||||
[2:----------------------------------------]|
|
||||
[2:----------------------------------------]|
|
||||
[2:----------------------------------------]|
|
||||
{4:[No Name] [+] }|
|
||||
[2:----------------------------------------]|
|
||||
|
|
||||
## grid 2
|
||||
{14: 1 }^x |
|
||||
@@ -217,6 +217,7 @@ describe('floating windows', function()
|
||||
{14: 3 } |
|
||||
{0:~ }|
|
||||
{0:~ }|
|
||||
{0:~ }|
|
||||
## grid 3
|
||||
{15: }|
|
||||
{16:~ }|
|
||||
@@ -230,7 +231,7 @@ describe('floating windows', function()
|
||||
{14: 3 } {15: } |
|
||||
{0:~ }{16:~ }{0: }|
|
||||
{0:~ }{16:~ }{0: }|
|
||||
{4:[No Name] }{16:~ }{4: }|
|
||||
{0:~ }{16:~ }{0: }|
|
||||
|
|
||||
]])
|
||||
end
|
||||
@@ -3169,13 +3170,14 @@ describe('floating windows', function()
|
||||
[2:----------------------------------------]|
|
||||
[2:----------------------------------------]|
|
||||
[2:----------------------------------------]|
|
||||
{4:[No Name] [+] }|
|
||||
[2:----------------------------------------]|
|
||||
:tabnext |
|
||||
## grid 2
|
||||
^x |
|
||||
{0:~ }|
|
||||
{0:~ }|
|
||||
{0:~ }|
|
||||
{0:~ }|
|
||||
## grid 3
|
||||
{1:y }|
|
||||
{2:~ }|
|
||||
@@ -3193,7 +3195,7 @@ describe('floating windows', function()
|
||||
{0:~ }{1:y }{0: }|
|
||||
{0:~ }{2:~ }{0: }|
|
||||
{0:~ }|
|
||||
{4:[No Name] [+] }|
|
||||
{0:~ }|
|
||||
:tabnext |
|
||||
]])
|
||||
end
|
||||
@@ -3214,6 +3216,7 @@ describe('floating windows', function()
|
||||
{0:~ }|
|
||||
{0:~ }|
|
||||
{0:~ }|
|
||||
{0:~ }|
|
||||
## grid 3
|
||||
{1:y }|
|
||||
{2:~ }|
|
||||
@@ -3282,13 +3285,14 @@ describe('floating windows', function()
|
||||
[2:----------------------------------------]|
|
||||
[2:----------------------------------------]|
|
||||
[2:----------------------------------------]|
|
||||
{4:[No Name] [+] }|
|
||||
[2:----------------------------------------]|
|
||||
:tabnext |
|
||||
## grid 2
|
||||
^x |
|
||||
{0:~ }|
|
||||
{0:~ }|
|
||||
{0:~ }|
|
||||
{0:~ }|
|
||||
## grid 3
|
||||
y |
|
||||
{0:~ }|
|
||||
@@ -3310,13 +3314,14 @@ describe('floating windows', function()
|
||||
[4:----------------------------------------]|
|
||||
[4:----------------------------------------]|
|
||||
[4:----------------------------------------]|
|
||||
{4:[No Name] }|
|
||||
[4:----------------------------------------]|
|
||||
:tabnext |
|
||||
## grid 2
|
||||
x |
|
||||
{0:~ }|
|
||||
{0:~ }|
|
||||
{0:~ }|
|
||||
{0:~ }|
|
||||
## grid 3
|
||||
y |
|
||||
{0:~ }|
|
||||
@@ -3325,6 +3330,7 @@ describe('floating windows', function()
|
||||
{0:~ }|
|
||||
{0:~ }|
|
||||
{0:~ }|
|
||||
{0:~ }|
|
||||
]], float_pos=expected_pos}
|
||||
end
|
||||
end)
|
||||
|
Reference in New Issue
Block a user