Reduce use of VimL (#168)
* perf(context): reduce use of `cmd` and `fn` * perf(float): reduce use of `cmd` and `fn` * perf(init): reduce use of `cmd` and `fn` * perf(menu): reduce use of `cmd` and `fn` * perf(plugin): reduce use of `cmd` and `fn` * docs(README): reduce use of `cmd` and `fn`
This commit is contained in:
@@ -55,8 +55,9 @@ context.new = function(prev_context, option)
|
||||
self.cursor_line = vim.api.nvim_get_current_line()
|
||||
self.virtcol = vim.fn.virtcol('.')
|
||||
self.cursor = {}
|
||||
self.cursor.row = vim.api.nvim_win_get_cursor(0)[1]
|
||||
self.cursor.col = vim.api.nvim_win_get_cursor(0)[2] + 1
|
||||
local cursor = vim.api.nvim_win_get_cursor(0)
|
||||
self.cursor.row = cursor[1]
|
||||
self.cursor.col = cursor[2] + 1
|
||||
self.cursor.line = self.cursor.row - 1
|
||||
self.cursor.character = misc.to_utfindex(self.cursor_line, self.cursor.col)
|
||||
self.cursor_before_line = string.sub(self.cursor_line, 1, self.cursor.col - 1)
|
||||
|
||||
Reference in New Issue
Block a user