diff options
| author | Stephan Seitz <stephan.seitz@fau.de> | 2020-05-22 17:04:46 +0200 |
|---|---|---|
| committer | Stephan Seitz <stephan.seitz@fau.de> | 2020-05-22 17:07:28 +0200 |
| commit | 3b3a692e2cd26eae9cd2d591133101790153163e (patch) | |
| tree | 2b7b6c514c9431b973d8d1ae4a4ff68188f3ce60 /lua/nvim-treesitter/incremental_selection.lua | |
| parent | d8328b8e1c36739c61e413366c9395ceb2397ce9 (diff) | |
Remove postspaces and avoid one global
Diffstat (limited to 'lua/nvim-treesitter/incremental_selection.lua')
| -rw-r--r-- | lua/nvim-treesitter/incremental_selection.lua | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lua/nvim-treesitter/incremental_selection.lua b/lua/nvim-treesitter/incremental_selection.lua index ea7a9f71..9876f2e0 100644 --- a/lua/nvim-treesitter/incremental_selection.lua +++ b/lua/nvim-treesitter/incremental_selection.lua @@ -27,7 +27,7 @@ local function select_incremental(get_parent) -- initialize incremental selection with current range if #buf_state.selection.nodes == 0 then local cur_range = buf_state.selection.range - if not cur_range then + if not cur_range then local _, cursor_row, cursor_col, _ = unpack(vim.fn.getpos(".")) cur_range = { cursor_row, cursor_col, cursor_row, cursor_col + 1 } end @@ -35,9 +35,9 @@ local function select_incremental(get_parent) local root = buf_state.parser.tree:root() if not root then return end - node = root:named_descendant_for_range(cur_range[1]-1, cur_range[2]-1, cur_range[3]-1, cur_range[4]-1) + node = root:named_descendant_for_range(cur_range[1]-1, cur_range[2]-1, cur_range[3]-1, cur_range[4]-1) else - node = get_parent(buf_state.selection.nodes[#buf_state.selection.nodes]) + node = get_parent(buf_state.selection.nodes[#buf_state.selection.nodes]) end if not node then return end |
