Skip to content

Conversation

@adoyle-h
Copy link

Reason: :edit will trigger autocmd BufUnload and then data.delete_buf(bufnr). So the data has no symbols.

The content of lualine comes from get_status_normal() and get_status_dense() which formating symbols. But get_location return empty,

  if not data.has_symbols(0) then
    return {}
  end

So we need to fetch symbols on BufEnter.

Reason: :edit will trigger autocmd BufUnload and then data.delete_buf(bufnr). So the data has no symbols.

The content of lualine comes from get_status_normal() and get_status_dense() which formating symbols. But get_location
return empty,

  if not data.has_symbols(0) then
    return {}
  end

So we need to fetch symbols on BufEnter.
@github-actions github-actions bot requested a review from stevearc July 24, 2025 19:09
Copy link
Owner

@stevearc stevearc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As an alternative, what do you think about changing the BufUnload autocmd to trigger on BufWipeout? Does that fix your issue?

@adoyle-h
Copy link
Author

adoyle-h commented Aug 26, 2025

As an alternative, what do you think about changing the BufUnload autocmd to trigger on BufWipeout? Does that fix your issue?

Yes, that fixes my issue.

@stevearc
Copy link
Owner

Great! I've made that change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants