Use escape sequence instead of raw binaries (#662)

* Fix: use escape sequence instead of binary chars

binary data will confuse some programs e.g. file and treat the code as "data" instead of "text"

* Fix: remove redundant binary character "0x1a"
This commit is contained in:
HE7086 2022-04-24 07:29:53 +02:00 committed by GitHub
parent 18a07f790e
commit 43c69a3479
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 36 additions and 36 deletions

View File

@ -7,7 +7,7 @@ local default_options = {
} }
function M:init(options) function M:init(options)
options.buffers_color = nil -- bufers_color isn't windpws option. options.buffers_color = nil -- bufers_color isn't windpws option.
M.super.init(self, options) M.super.init(self, options)
self.options = vim.tbl_deep_extend('keep', self.options or {}, default_options) self.options = vim.tbl_deep_extend('keep', self.options or {}, default_options)

View File

@ -8,7 +8,7 @@ Mode.map = {
['no'] = 'O-PENDING', ['no'] = 'O-PENDING',
['nov'] = 'O-PENDING', ['nov'] = 'O-PENDING',
['noV'] = 'O-PENDING', ['noV'] = 'O-PENDING',
['no'] = 'O-PENDING', ['no\x16'] = 'O-PENDING',
['niI'] = 'NORMAL', ['niI'] = 'NORMAL',
['niR'] = 'NORMAL', ['niR'] = 'NORMAL',
['niV'] = 'NORMAL', ['niV'] = 'NORMAL',
@ -17,11 +17,11 @@ Mode.map = {
['vs'] = 'VISUAL', ['vs'] = 'VISUAL',
['V'] = 'V-LINE', ['V'] = 'V-LINE',
['Vs'] = 'V-LINE', ['Vs'] = 'V-LINE',
[''] = 'V-BLOCK', ['\x16'] = 'V-BLOCK',
['s'] = 'V-BLOCK', ['\x16s'] = 'V-BLOCK',
['s'] = 'SELECT', ['s'] = 'SELECT',
['S'] = 'S-LINE', ['S'] = 'S-LINE',
[''] = 'S-BLOCK', ['\x13'] = 'S-BLOCK',
['i'] = 'INSERT', ['i'] = 'INSERT',
['ic'] = 'INSERT', ['ic'] = 'INSERT',
['ix'] = 'INSERT', ['ix'] = 'INSERT',