vis
a vi-like editor based on Plan 9's structural regular expressions
git clone https://9o.is/git/vis.git
commit 00eea1ed3eefa016852c9a063e10b56511a53d48 parent eee0258aa43b01c2bf25201580ee91bcdc903e04 Author: Marc André Tanner <mat@brain-dump.org> Date: Thu, 17 Nov 2016 10:49:58 +0100 test: use :qall! to terminate tests This should make sure that vis always terminates and never hangs waiting for further input. Lua errors in particular cause a new window/file to be displayed showing a detailed error message. Previously only this internal file was closed but the original file remained open and prevented vis from exiting. Diffstat:
| M | lua/visrc.lua | | | 2 | +- |
| M | vim/test.sh | | | 2 | +- |
| M | vis/visrc.lua | | | 2 | +- |
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/lua/visrc.lua b/lua/visrc.lua @@ -9,5 +9,5 @@ vis.events.win_open = function(win) lua_file = string.gsub(in_file, '%.in$', '.lua') dofile(lua_file) end - vis:command('q!') + vis:command('qall!') end diff --git a/vim/test.sh b/vim/test.sh @@ -26,7 +26,7 @@ for t in $TESTS; do printf "Running test %s with %s ... " "$t" "$e" rm -f "$OUT" "$ERR" [ "$e" = "$VIM" ] && EDITOR="$VIM -u NONE -U NONE -N -i NONE" - { cat "$t.keys"; printf "<Escape>:wq! $OUT<Enter>\n"; } | cpp -P 2>/dev/null | sed 's/[ \t]*$//' | ../util/keys | $EDITOR "$t.in" 2> /dev/null + { cat "$t.keys"; printf "<Escape>:w! $OUT<Enter>:qall!<Enter>\n"; } | cpp -P 2>/dev/null | sed 's/[ \t]*$//' | ../util/keys | $EDITOR "$t.in" 2> /dev/null if [ "$e" = "$VIM" ]; then if [ -e "$REF" ]; then if cmp -s "$REF" "$OUT"; then diff --git a/vis/visrc.lua b/vis/visrc.lua @@ -13,5 +13,5 @@ vis.events.win_open = function(win) vis:feedkeys(keys..'<Escape>') vis:command(string.format("w! '%s.out'", name)) end - vis:command('q!') + vis:command('qall!') end