aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/nvim/po/af.po11
-rw-r--r--src/nvim/po/de.po7
-rw-r--r--src/nvim/po/eo.po7
-rw-r--r--src/nvim/po/es.po7
-rw-r--r--src/nvim/po/fi.po8
-rw-r--r--src/nvim/po/fr.po6
-rw-r--r--src/nvim/po/ga.po15
-rw-r--r--src/nvim/po/it.po1
-rw-r--r--src/nvim/po/ja.euc-jp.po5
-rw-r--r--src/nvim/po/ja.po5
-rw-r--r--src/nvim/po/ru.po9
-rw-r--r--src/nvim/po/sr.po3
-rw-r--r--src/nvim/po/uk.po8
-rw-r--r--src/nvim/po/zh_CN.UTF-8.po6
-rw-r--r--src/nvim/po/zh_TW.UTF-8.po5
-rw-r--r--src/nvim/screen.c2
-rw-r--r--src/nvim/testdir/test_autocmd.vim21
-rw-r--r--src/nvim/testdir/test_statusline.vim14
-rw-r--r--src/nvim/testdir/test_tabline.vim48
-rw-r--r--src/nvim/window.c22
20 files changed, 170 insertions, 40 deletions
diff --git a/src/nvim/po/af.po b/src/nvim/po/af.po
index a76dd8eeea..82345f8a46 100644
--- a/src/nvim/po/af.po
+++ b/src/nvim/po/af.po
@@ -34,6 +34,7 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=ISO_8859-1\n"
"Content-Transfer-Encoding: 8-bit\n"
+"Plural-Forms: nplurals=2; plural=n!=1;\n"
#~ msgid "[Location List]"
#~ msgstr ""
@@ -645,11 +646,11 @@ msgstr "&Ok"
#~ msgid "filter() argument"
#~ msgstr ""
-#, fuzzy, c-format
-#~ msgid "+-%s%3ld line: "
-#~ msgid_plural "+-%s%3ld lines: "
-#~ msgstr[0] "+-%s%3ld rels: "
-#~ msgstr[1] "+-%s%3ld rels: "
+#, c-format
+msgid "+-%s%3ld line: "
+msgid_plural "+-%s%3ld lines: "
+msgstr[0] "+-%s%3ld rels: "
+msgstr[1] "+-%s%3ld rels: "
#, fuzzy, c-format
#~ msgid "E700: Unknown function: %s"
diff --git a/src/nvim/po/de.po b/src/nvim/po/de.po
index 740e9e5f6a..2dde77e9f7 100644
--- a/src/nvim/po/de.po
+++ b/src/nvim/po/de.po
@@ -18,6 +18,7 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=ISO_8859-1\n"
"Content-Transfer-Encoding: 8-bit\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#: ../api/private/helpers.c:197
msgid "Unable to get option value"
@@ -6233,8 +6234,10 @@ msgstr "filter()-Argument"
#: ../eval.c:8717
#, c-format
-msgid "+-%s%3ld lines: "
-msgstr "+-%s%3ld Zeilen: "
+msgid "+-%s%3ld line: "
+msgid_plural "+-%s%3ld lines: "
+msgstr[0] "+-%s%3ld Zeile: "
+msgstr[1] "+-%s%3ld Zeilen: "
#: ../eval.c:8779
#, c-format
diff --git a/src/nvim/po/eo.po b/src/nvim/po/eo.po
index 9b374e91ae..1c503d0a84 100644
--- a/src/nvim/po/eo.po
+++ b/src/nvim/po/eo.po
@@ -25,6 +25,7 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
msgid "E831: bf_key_init() called with empty password"
msgstr "E831: bf_key_init() alvokita kun malplena pasvorto"
@@ -1932,6 +1933,12 @@ msgstr "E350: Ne eblas krei faldon per la aktuala 'foldmethod'"
msgid "E351: Cannot delete fold with current 'foldmethod'"
msgstr "E351: Ne eblas forviŝi faldon per la aktuala 'foldmethod'"
+#, c-format
+msgid "+-%s%3ld line: "
+msgid_plural "+-%s%3ld lines: "
+msgstr[0] "+-%s%3ld linio: "
+msgstr[1] "+-%s%3ld linioj: "
+
msgid "E222: Add to read buffer"
msgstr "E222: Aldoni al lega bufro"
diff --git a/src/nvim/po/es.po b/src/nvim/po/es.po
index 064484d1a4..adea651b7c 100644
--- a/src/nvim/po/es.po
+++ b/src/nvim/po/es.po
@@ -19,6 +19,7 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: octect-stream\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#: ../api/private/helpers.c:201
#, fuzzy
@@ -786,8 +787,10 @@ msgstr "-c [argumentos]"
#: ../eval.c:9229
#, c-format
-msgid "+-%s%3ld lines: "
-msgstr "+-%s%3ld líneas: "
+msgid "+-%s%3ld line: "
+msgid_plural "+-%s%3ld lines: "
+msgstr[0] "+-%s%3ld línea: "
+msgstr[1] "+-%s%3ld líneas: "
#: ../eval.c:9291
#, c-format
diff --git a/src/nvim/po/fi.po b/src/nvim/po/fi.po
index 77d5f7f826..f10d4ce977 100644
--- a/src/nvim/po/fi.po
+++ b/src/nvim/po/fi.po
@@ -841,9 +841,11 @@ msgstr "map()-argumentti"
msgid "filter() argument"
msgstr "filter()-argumentti"
-#, fuzzy, c-format
-#~ msgid "+-%s%3ld lines: "
-#~ msgstr "+-%s%3ld rivi: "
+#, c-format
+msgid "+-%s%3ld line: "
+msgid_plural "+-%s%3ld lines: "
+msgstr[0] "+--%s%3ld rivi: "
+msgstr[1] "+--%s%3ld riviä: "
#, c-format
msgid "E700: Unknown function: %s"
diff --git a/src/nvim/po/fr.po b/src/nvim/po/fr.po
index 6df7741f1a..614ba013e6 100644
--- a/src/nvim/po/fr.po
+++ b/src/nvim/po/fr.po
@@ -1574,6 +1574,12 @@ msgid_plural "+--%3ld lines folded "
msgstr[0] "+--%3ld ligne dplace "
msgstr[1] "+--%3ld lignes dplaces "
+#, c-format
+msgid "+-%s%3ld line: "
+msgid_plural "+-%s%3ld lines: "
+msgstr[0] "+-%s%3ld ligne : "
+msgstr[1] "+-%s%3ld lignes : "
+
msgid "E222: Add to read buffer"
msgstr "E222: Ajout au tampon de lecture"
diff --git a/src/nvim/po/ga.po b/src/nvim/po/ga.po
index ff16a87dbc..1c25ee481c 100644
--- a/src/nvim/po/ga.po
+++ b/src/nvim/po/ga.po
@@ -7103,13 +7103,14 @@ msgstr ""
"Norbh fhidir an chonair a shocr: n liosta sys.path\n"
"Ba chir duit vim.VIM_SPECIAL_PATH a cheangal le deireadh sys.path"
-#~ msgid "+-%s%3ld line: "
-#~ msgid_plural "+-%s%3ld lines: "
-#~ msgstr[0] "+-%s%3ld lne: "
-#~ msgstr[1] "+-%s%3ld lne: "
-#~ msgstr[2] "+-%s%3ld lne: "
-#~ msgstr[3] "+-%s%3ld lne: "
-#~ msgstr[4] "+-%s%3ld lne: "
+#, c-format
+msgid "+-%s%3ld line: "
+msgid_plural "+-%s%3ld lines: "
+msgstr[0] "+-%s%3ld lne: "
+msgstr[1] "+-%s%3ld lne: "
+msgstr[2] "+-%s%3ld lne: "
+msgstr[3] "+-%s%3ld lne: "
+msgstr[4] "+-%s%3ld lne: "
#~ msgid "+--%3ld line folded "
#~ msgid_plural "+--%3ld lines folded "
diff --git a/src/nvim/po/it.po b/src/nvim/po/it.po
index dfabc4bee0..313280c807 100644
--- a/src/nvim/po/it.po
+++ b/src/nvim/po/it.po
@@ -25,6 +25,7 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=ISO_8859-1\n"
"Content-Transfer-Encoding: 8-bit\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#: ../api/private/helpers.c:201
msgid "Unable to get option value"
diff --git a/src/nvim/po/ja.euc-jp.po b/src/nvim/po/ja.euc-jp.po
index 9633bec9f2..d7d0faca80 100644
--- a/src/nvim/po/ja.euc-jp.po
+++ b/src/nvim/po/ja.euc-jp.po
@@ -1837,6 +1837,11 @@ msgid "+--%3ld line folded "
msgid_plural "+--%3ld lines folded "
msgstr[0] "+--%3ld Ԥ޾ޤޤ"
+#, c-format
+msgid "+-%s%3ld line: "
+msgid_plural "+-%s%3ld lines: "
+msgstr[0] "+-%s%3ld : "
+
msgid "E222: Add to read buffer"
msgstr "E222: ɹХåեɲ"
diff --git a/src/nvim/po/ja.po b/src/nvim/po/ja.po
index c363c00fa6..b56345e066 100644
--- a/src/nvim/po/ja.po
+++ b/src/nvim/po/ja.po
@@ -1837,6 +1837,11 @@ msgid "+--%3ld line folded "
msgid_plural "+--%3ld lines folded "
msgstr[0] "+--%3ld 行が折畳まれました"
+#, c-format
+msgid "+-%s%3ld line: "
+msgid_plural "+-%s%3ld lines: "
+msgstr[0] "+-%s%3ld 行: "
+
msgid "E222: Add to read buffer"
msgstr "E222: 読込バッファへ追加"
diff --git a/src/nvim/po/ru.po b/src/nvim/po/ru.po
index 5d3e51b7e2..7566036d3e 100644
--- a/src/nvim/po/ru.po
+++ b/src/nvim/po/ru.po
@@ -17,6 +17,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n"
+"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
#: ../api/private/helpers.c:201
#, fuzzy
@@ -767,8 +769,11 @@ msgstr "параметра filter()"
#: ../eval.c:9229
#, c-format
-msgid "+-%s%3ld lines: "
-msgstr "+-%s%3ld строк: "
+msgid "+-%s%3ld line: "
+msgid_plural "+-%s%3ld lines: "
+msgstr[0] "+-%s%3ld строка: "
+msgstr[1] "+-%s%3ld строки: "
+msgstr[2] "+-%s%3ld строк: "
#: ../eval.c:9291
#, c-format
diff --git a/src/nvim/po/sr.po b/src/nvim/po/sr.po
index d34c1c3100..3c45e1bf80 100644
--- a/src/nvim/po/sr.po
+++ b/src/nvim/po/sr.po
@@ -931,7 +931,8 @@ msgstr "&Ок"
msgid "+-%s%3ld line: "
msgid_plural "+-%s%3ld lines: "
msgstr[0] "+-%s%3ld линија: "
-msgstr[1] "+-%s%3ld линија: "
+msgstr[1] "+-%s%3ld линијe: "
+msgstr[2] "+-%s%3ld линија: "
#, c-format
msgid "E700: Unknown function: %s"
diff --git a/src/nvim/po/uk.po b/src/nvim/po/uk.po
index 7f0fe6a197..da87d50683 100644
--- a/src/nvim/po/uk.po
+++ b/src/nvim/po/uk.po
@@ -22,6 +22,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n"
+"%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n"
msgid "--Deleted--"
msgstr "--Знищено--"
@@ -852,6 +854,12 @@ msgstr ""
"%.*s"
#, c-format
+msgid "+-%s%3ld line: "
+msgid_plural "+-%s%3ld lines: "
+msgstr[0] "+-%s%3ld рядок: "
+msgstr[1] "+-%s%3ld рядків: "
+
+#, c-format
msgid "E474: Expected string end: %.*s"
msgstr "E474: Очікувався кінець рядка: %.*s"
diff --git a/src/nvim/po/zh_CN.UTF-8.po b/src/nvim/po/zh_CN.UTF-8.po
index 1e329443ce..9a8cd38f5e 100644
--- a/src/nvim/po/zh_CN.UTF-8.po
+++ b/src/nvim/po/zh_CN.UTF-8.po
@@ -23,6 +23,7 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8-bit\n"
+"Plural-Forms: nplurals=1; plural=0;\n"
#: ../api/private/helpers.c:201
#, fuzzy
@@ -781,8 +782,9 @@ msgstr "-c 参数"
#: ../eval.c:9229
#, c-format
-msgid "+-%s%3ld lines: "
-msgstr "+-%s%3ld 行: "
+msgid "+-%s%3ld line: "
+msgid_plural "+-%s%3ld lines: "
+msgstr[0] "+-%s%3ld 行: "
#: ../eval.c:9291
#, c-format
diff --git a/src/nvim/po/zh_TW.UTF-8.po b/src/nvim/po/zh_TW.UTF-8.po
index c97f31ddcf..e2fb2d39d4 100644
--- a/src/nvim/po/zh_TW.UTF-8.po
+++ b/src/nvim/po/zh_TW.UTF-8.po
@@ -827,8 +827,9 @@ msgstr ""
#: ../eval.c:9229
#, c-format
-msgid "+-%s%3ld lines: "
-msgstr "+-%s%3ld 行: "
+msgid "+-%s%3ld line: "
+msgid_plural "+-%s%3ld lines: "
+msgstr[0] "+-%s%3ld 行: "
#: ../eval.c:9291
#, fuzzy, c-format
diff --git a/src/nvim/screen.c b/src/nvim/screen.c
index 03d7cb1783..3d69d317fd 100644
--- a/src/nvim/screen.c
+++ b/src/nvim/screen.c
@@ -5493,7 +5493,7 @@ static void win_redr_border(win_T *wp)
int *attrs = wp->w_float_config.border_attr;
int *adj = wp->w_border_adj;
- int irow = wp->w_height_inner, icol = wp->w_width_inner;
+ int irow = wp->w_height_inner + wp->w_winbar_height, icol = wp->w_width_inner;
if (adj[0]) {
grid_puts_line_start(grid, 0);
diff --git a/src/nvim/testdir/test_autocmd.vim b/src/nvim/testdir/test_autocmd.vim
index 4b575bdfc3..1936832400 100644
--- a/src/nvim/testdir/test_autocmd.vim
+++ b/src/nvim/testdir/test_autocmd.vim
@@ -2669,6 +2669,27 @@ func Test_autocmd_window()
%bw!
endfunc
+" Test for trying to close the temporary window used for executing an autocmd
+func Test_close_autocmd_window()
+ %bw!
+ edit one.txt
+ tabnew two.txt
+ augroup aucmd_win_test2
+ au!
+ " Nvim makes aucmd_win the last window
+ " au BufEnter * if expand('<afile>') == 'one.txt' | 1close | endif
+ au BufEnter * if expand('<afile>') == 'one.txt' | close | endif
+ augroup END
+
+ call assert_fails('doautoall BufEnter', 'E813:')
+
+ augroup aucmd_win_test2
+ au!
+ augroup END
+ augroup! aucmd_win_test2
+ %bw!
+endfunc
+
" Test for trying to close the tab that has the temporary window for exeucing
" an autocmd.
func Test_close_autocmd_tab()
diff --git a/src/nvim/testdir/test_statusline.vim b/src/nvim/testdir/test_statusline.vim
index f36ff83fdf..ec35fac964 100644
--- a/src/nvim/testdir/test_statusline.vim
+++ b/src/nvim/testdir/test_statusline.vim
@@ -2,8 +2,6 @@
"
" Not tested yet:
" %N
-" %T
-" %X
source view_util.vim
source check.vim
@@ -108,6 +106,18 @@ func Test_statusline()
set statusline=%F
call assert_match('/testdir/Xstatusline\s*$', s:get_statusline())
+ " Test for min and max width with %(. For some reason, if this test is moved
+ " after the below test for the help buffer flag, then the code to truncate
+ " the string is not executed.
+ set statusline=%015(%f%)
+ call assert_match('^ Xstatusline\s*$', s:get_statusline())
+ set statusline=%.6(%f%)
+ call assert_match('^<sline\s*$', s:get_statusline())
+ set statusline=%14f
+ call assert_match('^ Xstatusline\s*$', s:get_statusline())
+ set statusline=%.4L
+ call assert_match('^10>3\s*$', s:get_statusline())
+
" %h: Help buffer flag, text is "[help]".
" %H: Help buffer flag, text is ",HLP".
set statusline=%h,%H
diff --git a/src/nvim/testdir/test_tabline.vim b/src/nvim/testdir/test_tabline.vim
index 3a18206078..e58a412c5a 100644
--- a/src/nvim/testdir/test_tabline.vim
+++ b/src/nvim/testdir/test_tabline.vim
@@ -1,3 +1,4 @@
+" Test for tabline
source shared.vim
@@ -17,6 +18,9 @@ func TablineWithError()
endfunc
func Test_caught_error_in_tabline()
+ if has('gui')
+ set guioptions-=e
+ endif
let showtabline_save = &showtabline
set showtabline=2
let s:func_in_tabline_called = 0
@@ -30,6 +34,9 @@ func Test_caught_error_in_tabline()
endfunc
func Test_tabline_will_be_disabled_with_error()
+ if has('gui')
+ set guioptions-=e
+ endif
let showtabline_save = &showtabline
set showtabline=2
let s:func_in_tabline_called = 0
@@ -65,6 +72,47 @@ func Test_redrawtabline()
au! Bufadd
endfunc
+" Test for the "%T" and "%X" flags in the 'tabline' option
+func MyTabLine()
+ let s = ''
+ for i in range(tabpagenr('$'))
+ " set the tab page number (for mouse clicks)
+ let s .= '%' . (i + 1) . 'T'
+
+ " the label is made by MyTabLabel()
+ let s .= ' %{MyTabLabel(' . (i + 1) . ')} '
+ endfor
+
+ " after the last tab fill with TabLineFill and reset tab page nr
+ let s .= '%T'
+
+ " right-align the label to close the current tab page
+ if tabpagenr('$') > 1
+ let s .= '%=%Xclose'
+ endif
+
+ return s
+endfunc
+
+func MyTabLabel(n)
+ let buflist = tabpagebuflist(a:n)
+ let winnr = tabpagewinnr(a:n)
+ return bufname(buflist[winnr - 1])
+endfunc
+
+func Test_tabline_flags()
+ if has('gui')
+ set guioptions-=e
+ endif
+ set tabline=%!MyTabLine()
+ edit Xtabline1
+ tabnew Xtabline2
+ redrawtabline
+ call assert_match('^ Xtabline1 Xtabline2\s\+close$', Screenline(1))
+ set tabline=
+ %bw!
+endfunc
+
function EmptyTabname()
return ""
endfunction
diff --git a/src/nvim/window.c b/src/nvim/window.c
index 771a85479d..7895391697 100644
--- a/src/nvim/window.c
+++ b/src/nvim/window.c
@@ -783,8 +783,8 @@ void win_config_float(win_T *wp, FloatConfig fconfig)
}
if (!ui_has(kUIMultigrid)) {
- wp->w_height = MIN(wp->w_height, Rows - 1 - win_extra_height(wp));
- wp->w_width = MIN(wp->w_width, Columns - win_extra_width(wp));
+ wp->w_height = MIN(wp->w_height, Rows - 1 - win_border_height(wp));
+ wp->w_width = MIN(wp->w_width, Columns - win_border_width(wp));
}
win_set_inner_size(wp);
@@ -1266,8 +1266,9 @@ int win_split_ins(int size, int flags, win_T *new_wp, int dir)
} else if (wp->w_floating) {
new_frame(wp);
wp->w_floating = false;
- // non-floating window doesn't store float config.
+ // non-floating window doesn't store float config or have a border.
wp->w_float_config = FLOAT_CONFIG_INIT;
+ memset(wp->w_border_adj, 0, sizeof(wp->w_border_adj));
}
/*
@@ -1940,7 +1941,7 @@ static void win_totop(int size, int flags)
} else {
// No longer a float, a non-multigrid UI shouldn't draw it as such
ui_call_win_hide(curwin->w_grid_alloc.handle);
- win_free_grid(curwin, false);
+ win_free_grid(curwin, true);
}
} else {
// Remove the window and frame from the tree of frames.
@@ -5178,8 +5179,7 @@ void win_free_grid(win_T *wp, bool reinit)
}
grid_free(&wp->w_grid_alloc);
if (reinit) {
- // if a float is turned into a split and back into a float, the grid
- // data structure will be reused
+ // if a float is turned into a split, the grid data structure will be reused
memset(&wp->w_grid_alloc, 0, sizeof(wp->w_grid_alloc));
}
}
@@ -6330,18 +6330,18 @@ void win_set_inner_size(win_T *wp)
terminal_check_size(wp->w_buffer->terminal);
}
- wp->w_height_outer = (wp->w_height_inner + win_extra_height(wp));
- wp->w_width_outer = (wp->w_width_inner + win_extra_width(wp));
+ wp->w_height_outer = (wp->w_height_inner + win_border_height(wp) + wp->w_winbar_height);
+ wp->w_width_outer = (wp->w_width_inner + win_border_width(wp));
wp->w_winrow_off = wp->w_border_adj[0] + wp->w_winbar_height;
wp->w_wincol_off = wp->w_border_adj[3];
}
-static int win_extra_height(win_T *wp)
+static int win_border_height(win_T *wp)
{
- return wp->w_border_adj[0] + wp->w_border_adj[2] + wp->w_winbar_height;
+ return wp->w_border_adj[0] + wp->w_border_adj[2];
}
-static int win_extra_width(win_T *wp)
+static int win_border_width(win_T *wp)
{
return wp->w_border_adj[1] + wp->w_border_adj[3];
}