From f3da4a3f2da0e698f14c513469c4f93461103225 Mon Sep 17 00:00:00 2001 From: Alex Yatskov Date: Tue, 23 Apr 2024 20:38:56 -0700 Subject: [PATCH] WIP --- lua/argonaut/types.lua | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/lua/argonaut/types.lua b/lua/argonaut/types.lua index aaadf07..ec9b4c0 100644 --- a/lua/argonaut/types.lua +++ b/lua/argonaut/types.lua @@ -14,6 +14,10 @@ function Cursor.get() return Cursor.new(row, col) end +function Cursor:set() + vim.fn.secursorcharpos({self.row, self.col}) +end + function Cursor:is_valid() return self.row > 0 and self.col > 0 end @@ -203,7 +207,6 @@ function Arg:append(char) self.text = self.text .. char end - -- -- ArgList -- @@ -230,11 +233,6 @@ function ArgList:flush() end function ArgList:update(char, brace_stack, brace_range, cursor) - if not char then - self:flush() - return - end - if not cursor:is_string() then brace_stack:update(char) if brace_stack:empty() and char == ',' then @@ -279,5 +277,5 @@ function ArgList:parse(brace_range) end end - self:update() + self:flush() end