viml/parser: Handle encoding conversions

This commit is contained in:
ZyX
2017-08-20 20:40:59 +03:00
parent 0300c4d109
commit 2d8b9937de
3 changed files with 49 additions and 5 deletions

View File

@@ -110,15 +110,22 @@ local function new_pstate(strings)
end
ret_pline.data = data
ret_pline.size = size
ret_pline.allocated = false
end
local pline_init = {
data = nil,
size = 0,
allocated = false,
}
local state = {
reader = {
get_line = get_line,
cookie = nil,
conv = {
vc_type = 0,
vc_factor = 1,
vc_fail = false,
},
},
pos = { line = 0, col = 0 },
colors = kvi_new('ParserHighlight'),