Merge pull request #38203 from zeertzjq/vim-9.2.0120

vim-patch:9.{1.1484,2.0120,2.0125}
This commit is contained in:
zeertzjq
2026-03-09 07:38:49 +08:00
committed by GitHub
3 changed files with 20 additions and 16 deletions

View File

@@ -147,17 +147,17 @@ describe('normal', function()
end)
clear({ env = { LANG = 'tr_TR.UTF-8' } })
screen = Screen.new(75, 5)
screen = Screen.new(40, 5)
exec('set ruler')
exec('lang tr_TR.UTF-8')
exec('put =range(1,40)')
exec('5')
screen:expect([[
3 |
^4 |
5 |
6 |
40 more lines 5,1 %8 |
3 |
^4 |
5 |
6 |
40 more lines 5,1 %8 |
]])
end)
end)

View File

@@ -4400,7 +4400,11 @@ endfunc
func Test_pos_percentage_in_turkish_locale()
CheckRunVimInTerminal
CheckNotMac
defer execute(':lang C')
if !filereadable('../po/tr.mo')
throw 'Skipped: tr.mo not built, run make in src/po first'
endif
try
let dir = expand('$VIMRUNTIME/lang/tr/')
@@ -4410,7 +4414,7 @@ func Test_pos_percentage_in_turkish_locale()
call mkdir(target, '')
call filecopy(tr, target .. 'vim.mo')
lang tr_TR.UTF-8
let buf = RunVimInTerminal('', {'rows': 5})
let buf = RunVimInTerminal('', {'rows': 5, 'cols': 40})
call term_sendkeys(buf, ":lang tr_TR.UTF-8\<cr>")
call term_sendkeys(buf, ":put =range(1,40)\<cr>")
call term_sendkeys(buf, ":5\<cr>")

View File

@@ -623,7 +623,7 @@ func Test_format_align()
right
setlocal norightleft
call assert_equal("Vim", getline(1))
close!
bw!
endif
set tw&
@@ -1033,7 +1033,7 @@ func Test_mps_latin1()
normal %
call assert_equal(4, col('.'))
let &encoding = save_enc
close!
bw!
endfunc
func Test_empty_matchpairs()
@@ -1173,7 +1173,7 @@ func Test_visual_gq_format()
redraw!
normal gq
setl textwidth&
close!
bw!
endfunc
" Test for 'n' flag in 'formatoptions' to format numbered lists
@@ -1186,7 +1186,7 @@ func Test_fo_n()
normal gggqG
call assert_equal([' 1) one two', ' three', ' four', ' 2) two'],
\ getline(1, '$'))
close!
bw!
endfunc
" Test for 'formatlistpat' option
@@ -1200,7 +1200,7 @@ func Test_formatlistpat()
normal gggqG
call assert_equal([' - one', ' two', ' three', ' - two'],
\ getline(1, '$'))
close!
bw!
endfunc
" Test for the 'b' and 'v' flags in 'formatoptions'
@@ -1233,7 +1233,7 @@ func Test_fo_b()
call feedkeys('Amore five', 'xt')
call assert_equal(['one two three fourmore', 'five'], getline(1, '$'))
close!
bw!
endfunc
" Test for the '1' flag in 'formatoptions'. Don't wrap text after a one letter
@@ -1253,7 +1253,7 @@ func Test_fo_1()
call feedkeys('A a bird', 'xt')
call assert_equal(['one two three four', 'a bird'], getline(1, '$'))
close!
bw!
endfunc
" Test for 'l' flag in 'formatoptions'. When starting insert mode, if a line
@@ -1273,7 +1273,7 @@ func Test_fo_l()
call feedkeys('A six', 'xt')
call assert_equal(['one two three four five six'], getline(1, '$'))
close!
bw!
endfunc
" Test for the '2' flag in 'formatoptions'
@@ -1289,7 +1289,7 @@ func Test_fo_2()
call assert_equal(["\tfirst line of a",
\ "paragraph. second line of the",
\ "same paragraph. third line."], getline(1, '$'))
close!
bw!
endfunc
" This was leaving the cursor after the end of a line. Complicated way to