vis icon indicating copy to clipboard operation
vis copied to clipboard

Bash lexer crashes when end tag of here document is off-screen

Open dragonmaus opened this issue 3 years ago • 1 comments

If a bash script contains a here document that is only partially on-screen (that is, the start [the bit with << or <<-] is visible but the end is not), the lexer will crash with the following error:

/path/to/vis/lexers/bash.lua:<linenumber>: attempt to concatenate a nil value (local 'delimiter')

This crash is persistent, and will reoccur every time vis tries to render the partially off-screen here document.

(The inverse is not true; that is, the lexer will not crash if the end tag is visible but the start is not.)


Vis version: vis v0.7 +curses +lua +acl

dragonmaus avatar May 26 '22 19:05 dragonmaus

IIRC this was a bug in the bash lexer and I believe I've seen a fix for this pass by at scintillua.

OK found it: https://github.com/orbitalquark/scintillua/pull/43

ninewise avatar May 26 '22 22:05 ninewise