comparison src/testdir/test_edit.vim @ 28704:e1aff2f300be v8.2.4876

patch 8.2.4876: MS-Windows: Shift-BS results in strange char in powershell Commit: https://github.com/vim/vim/commit/dfbdadce44b754cfa9f55111bdc44bb6a5d6b320 Author: Christian Brabandt <cb@256bit.org> Date: Thu May 5 20:46:47 2022 +0100 patch 8.2.4876: MS-Windows: Shift-BS results in strange char in powershell Problem: MS-Windows: Shift-BS results in strange character in powershell. Solution: Add K_S_BS. (Christian Brabandt, closes https://github.com/vim/vim/issues/10283, closes https://github.com/vim/vim/issues/10279)
author Bram Moolenaar <Bram@vim.org>
date Thu, 05 May 2022 22:00:05 +0200
parents c3a7be75ef16
children faf3acb2509b
comparison
equal deleted inserted replaced
28703:d5622e8a1960 28704:e1aff2f300be
2146 redraw! 2146 redraw!
2147 set noreadonly ls& 2147 set noreadonly ls&
2148 bwipe! 2148 bwipe!
2149 endfunc 2149 endfunc
2150 2150
2151 func Test_edit_shift_bs()
2152 CheckMSWindows
2153
2154 " FIXME: this works interactively, but the test fails
2155 throw 'Skipped: Shift-Backspace Test not working correctly :('
2156
2157 " Need to run this in Win32 Terminal, do not use CheckRunVimInTerminal
2158 if !has("terminal")
2159 return
2160 endif
2161
2162 " Shift Backspace should work like Backspace in insert mode
2163 let lines =<< trim END
2164 call setline(1, ['abc'])
2165 END
2166 call writefile(lines, 'Xtest_edit_shift_bs')
2167
2168 let buf = RunVimInTerminal('-S Xtest_edit_shift_bs', #{rows: 3})
2169 call term_sendkeys(buf, "A\<S-BS>-\<esc>")
2170 call TermWait(buf, 50)
2171 call assert_equal('ab-', term_getline(buf, 1))
2172
2173 " clean up
2174 call StopVimInTerminal(buf)
2175 call delete('Xtest_edit_shift_bs')
2176 endfunc
2151 2177
2152 " vim: shiftwidth=2 sts=2 expandtab 2178 " vim: shiftwidth=2 sts=2 expandtab