neovim

Neovim text editor
git clone https://git.dasho.dev/neovim.git
Log | Files | Refs | README

commit 936c11f9c871f3c8a6e26473b9f70e53dfb94bc3
parent d07a39c54b1ecd767590821601c33164df4ba3e0
Author: zeertzjq <zeertzjq@outlook.com>
Date:   Tue,  5 Jul 2022 13:54:03 +0800

test(old): use Q -> gQ mapping instead of changing test when possible

Diffstat:
Msrc/nvim/testdir/setup.vim | 4++++
Msrc/nvim/testdir/test_substitute.vim | 2+-
Msrc/nvim/testdir/test_timers.vim | 2+-
3 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/src/nvim/testdir/setup.vim b/src/nvim/testdir/setup.vim @@ -30,6 +30,10 @@ set switchbuf= mapclear mapclear! +" Make "Q" switch to Ex mode. +" This does not work for all tests. +nnoremap Q gQ + " Prevent Nvim log from writing to stderr. let $NVIM_LOG_FILE = exists($NVIM_LOG_FILE) ? $NVIM_LOG_FILE : 'Xnvim.log' diff --git a/src/nvim/testdir/test_substitute.vim b/src/nvim/testdir/test_substitute.vim @@ -140,7 +140,7 @@ func Test_substitute_repeat() " This caused an invalid memory access. split Xfile s/^/x - call feedkeys("gQsc\<CR>y", 'tx') + call feedkeys("Qsc\<CR>y", 'tx') bwipe! endfunc diff --git a/src/nvim/testdir/test_timers.vim b/src/nvim/testdir/test_timers.vim @@ -279,7 +279,7 @@ func Test_ex_mode() endfunc let timer = timer_start(40, function('g:Foo'), {'repeat':-1}) " This used to throw error E749. - exe "normal gQsleep 100m\rvi\r" + exe "normal Qsleep 100m\rvi\r" call timer_stop(timer) endfunc