diff options
author | Kovas Palunas <kovas@uw.edu> | 2019-06-18 13:35:35 -0700 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2019-06-30 15:25:49 +0200 |
commit | fdd8dcae01beb66397226ad65e4f1bbd3d1dd55c (patch) | |
tree | 2450b7c70e68676cd2eec30005460f1e09e06ce9 /runtime/lua/man.lua | |
parent | 0480e991d2180025ef040629c5dcd0a193055a2e (diff) | |
download | rneovim-fdd8dcae01beb66397226ad65e4f1bbd3d1dd55c.tar.gz rneovim-fdd8dcae01beb66397226ad65e4f1bbd3d1dd55c.tar.bz2 rneovim-fdd8dcae01beb66397226ad65e4f1bbd3d1dd55c.zip |
man.vim: Handle ANSI escape sequences with ":" #10267
closes #10267
Diffstat (limited to 'runtime/lua/man.lua')
-rw-r--r-- | runtime/lua/man.lua | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/runtime/lua/man.lua b/runtime/lua/man.lua index 1da8ed85fc..ba6b9d09c9 100644 --- a/runtime/lua/man.lua +++ b/runtime/lua/man.lua @@ -107,7 +107,9 @@ local function highlight_line(line, linenr) -- followed by '[', then a series of parameter and intermediate bytes in -- the range 0x20 - 0x3f, then 'm'. (See ECMA-48, sections 5.4 & 8.3.117) local sgr = prev_char:match("^%[([\032-\063]*)m$") - if sgr then + -- Ignore escape sequences with : characters, as specified by ITU's T.416 + -- Open Document Architecture and interchange format. + if sgr and not string.find(sgr, ":") then local match while sgr and #sgr > 0 do -- Match against SGR parameters, which may be separated by ';' |