Skip to content

Commit 9b69b70

Browse files
committed
potential fix for toggle_virt working only once
1 parent 8247b97 commit 9b69b70

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

lua/nabla/utils.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,8 +99,8 @@ utils.get_all_mathzones = function(opts)
9999
cache.changedtick = vim.api.nvim_buf_get_changedtick(buf)
100100
else
101101
parse_span = {
102-
top = top < cache.top and top or (top >= cache.bottom and top or cache.bottom),
103-
bottom = bottom > cache.bottom and bottom or (bottom >= cache.top and cache.top or bottom),
102+
top = top <= cache.top and top or (top >= cache.bottom and top or cache.bottom),
103+
bottom = bottom >= cache.bottom and bottom or (bottom >= cache.top and cache.top or bottom),
104104
}
105105
end
106106
cache.top = math.min(cache.top, parse_span.top)

src/viewmode/fix_markdown.lua.t

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,8 @@ else
5454
cache.changedtick = vim.api.nvim_buf_get_changedtick(buf)
5555
else
5656
parse_span = {
57-
top = top < cache.top and top or (top >= cache.bottom and top or cache.bottom),
58-
bottom = bottom > cache.bottom and bottom or (bottom >= cache.top and cache.top or bottom),
57+
top = top <= cache.top and top or (top >= cache.bottom and top or cache.bottom),
58+
bottom = bottom >= cache.bottom and bottom or (bottom >= cache.top and cache.top or bottom),
5959
}
6060
end
6161
cache.top = math.min(cache.top, parse_span.top)

0 commit comments

Comments
 (0)