Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: don't allow empty scope #931

Merged
merged 1 commit into from
Oct 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions lua/ibl/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,7 @@ M.refresh = function(bufnr)
local scope_row_start, scope_col_start, scope_row_end, scope_col_end = -1, -1, -1, -1
local scope_index = -1
if scope then
---@diagnostic disable-next-line: cast-local-type
scope_row_start, scope_col_start, scope_row_end, scope_col_end = scope:range()
scope_row_start, scope_col_start, scope_row_end = scope_row_start + 1, scope_col_start + 1, scope_row_end + 1
end
Expand Down
2 changes: 1 addition & 1 deletion lua/ibl/scope.lua
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ M.get = function(bufnr, config)
local include_node_types =
utils.tbl_join(config.scope.include.node_type["*"] or {}, config.scope.include.node_type[lang] or {})

while node do
while node and node:byte_length() > 0 do
local type = node:type()

if
Expand Down
Loading