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:
Marco Hinz 2019-03-22 17:17:33 +01:00 committed by GitHub
parent fa6ed5f759
commit 3edf7fc64f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 13 additions and 7 deletions

View File

@ -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)

View File

@ -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)