Skip to content

Commit

Permalink
feat(word_diff): do not flicker when toggling
Browse files Browse the repository at this point in the history
  • Loading branch information
lewis6991 committed Nov 8, 2022
1 parent 84e8117 commit 9d73a30
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion lua/gitsigns/actions.lua

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion teal/gitsigns/actions.tl
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,8 @@ M.toggle_word_diff = function(value: boolean): boolean
else
config.word_diff = not config.word_diff
end
M.refresh()
-- Don't use refresh() to avoid flicker
api.nvim__buf_redraw_range(0, vim.fn.line('w0') - 1, vim.fn.line('w$'))
return config.word_diff
end

Expand Down

0 comments on commit 9d73a30

Please sign in to comment.