vt100 Hf position defaults to 1

This commit is contained in:
payonel 2019-06-23 01:02:51 -07:00
parent e0174b973f
commit a50b237734

View File

@ -35,8 +35,16 @@ end
-- [Line;ColumnH Move cursor to screen location v,h
-- [Line;Columnf ^ same
rules[{"%[", "%d+", ";", "%d+", "[Hf]"}] = function(window, _, y, _, x)
set_cursor(window, tonumber(x), tonumber(y))
-- [;H Move cursor to upper left corner
-- [;f ^ same
rules[{"%[", "%d*", ";", "%d*", "[Hf]"}] = function(window, _, y, _, x)
set_cursor(window, tonumber(x) or 1, tonumber(y) or 1)
end
-- [H move cursor to upper left corner
-- [f ^ same
rules[{"%[[Hf]"}] = function(window)
set_cursor(window, 1, 1)
end
-- [K clear line from cursor right
@ -63,14 +71,6 @@ rules[{"%[", "[012]?", "J"}] = function(window, _, n)
window.gpu.fill(1 + window.dx, y + window.dy, window.width, rep, " ")
end
-- [H move cursor to upper left corner
-- [;H ^ same
-- [f ^ same
-- [;f ^ same
rules[{"%[;?", "[Hf]"}] = function(window)
set_cursor(window, 1, 1)
end
-- [6n get the cursor position [ EscLine;ColumnR Response: cursor is at v,h ]
rules[{"%[", "6", "n"}] = function(window)
-- this solution puts the response on stdin, but it isn't echo'd