vis
a vi-like editor based on Plan 9's structural regular expressions
git clone https://9o.is/git/vis.git
commit 879da4e0bfcc56b3ea0c3632feaa014ab2fb615f parent baecbc4a5773150bc83abb33a460423c84e78cfe Author: Marc André Tanner <mat@brain-dump.org> Date: Thu, 17 Nov 2016 09:48:45 +0100 test/vis: remove trailing white spaces after pre-processing keys file Using cpp(1) to remove comments might not have been the best idea, some versions of clang leave trailing white space intact whereas gcc removes them. These trailing spaces were wrongly interpreted as <Space> input. This hopefully fixes the tests on Mac OS X. Diffstat:
| M | vis/visrc.lua | | | 2 | +- |
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/vis/visrc.lua b/vis/visrc.lua @@ -7,8 +7,8 @@ vis.events.win_open = function(win) name = string.gsub(name, '%.in$', '') local file = assert(io.popen(string.format("cpp -P '%s.keys'", name), 'r')) local keys = file:read('*all') + keys = string.gsub(keys, '%s*\n', '') keys = string.gsub(keys, '<Space>', ' ') - keys = string.gsub(keys, '\n', '') file:close() vis:feedkeys(keys..'<Escape>') vis:command(string.format("w! '%s.out'", name))