You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
vim-smoothie version: b440f13
vim version: 8.2.4700
As mentioned in the title, when I use the scrolling commands (e.g., <C-D>, zt) to cross the continuous folding, the cursor will be stuck. Then, j and k cannot work normally, for example:
"""""""""""""""""""""""""" +-- A (Fold)""""""""""""""""""""""""""""""""""""""""""""""""""" B {{{ (Fold)"""""""""""""""""""""""""
[CURSOR] (`j/k` cannot work after `zt`)
" }}}"""""""""""""""""""""""""" C {{{ (Fold)"""""""""""""""""""""""""" }}}"""""""""""""""""""""""""
Reacted by midrare, Ankush Malaker, kevin61416 and sarmong
I also met this similar bug, In a folded text contain about 1000 lines, press gg then G, then k cannot move, after waiting a few seconds or press za, it can recover to normal.
I can verify the same bug. I'd really like to continue using this plugin but this bug is a very common occurrence in my workflow. Could I contribute to fixing this somehow? I'm new to vim/vimL and would require some direction, though.
Thanks for reporting! Unfortunately I couldn't figure out yet why does that happen. For now I added a workaround, which should cause the plugin to jump directly to the target position if it detects that animation is stuck. It's not pretty, but at least will prevent trapping users and their cursors ;)
Hi @psliwka,
Thanks for workaround. IMHO, the problem may be because vim-smoothie does not consider the folded lines. Perhaps It can use foldclosedend() to calculate end line of folds.
@psliwka Thanks, you're the MVP. It doesn't get stuck after the update. If it helps diagnose at all, I use fzf with nvim and whenever I got this cursor stuck issue, I couldn't open fzf. I get an error with something along the lines of "Can't exit terminal mode and go into normal mode". Best of luck and thanks again!
Activity
Freed-Wu commentedon May 15, 2022
I also met this similar bug, In a folded text contain about 1000 lines, press
ggthenG, thenkcannot move, after waiting a few seconds or pressza, it can recover to normal.AnkushMalaker commentedon May 24, 2022
I can verify the same bug. I'd really like to continue using this plugin but this bug is a very common occurrence in my workflow. Could I contribute to fixing this somehow? I'm new to vim/vimL and would require some direction, though.
Freed-Wu commentedon May 24, 2022
I believe this bug occur after #34. A older vim-smoothie can avoid this bug.
Add workaround to prevent animation stucking
psliwka commentedon May 28, 2022
Thanks for reporting! Unfortunately I couldn't figure out yet why does that happen. For now I added a workaround, which should cause the plugin to jump directly to the target position if it detects that animation is stuck. It's not pretty, but at least will prevent trapping users and their cursors ;)
JS-Zheng commentedon May 29, 2022
Hi @psliwka,
Thanks for workaround. IMHO, the problem may be because vim-smoothie does not consider the folded lines. Perhaps It can use
foldclosedend()to calculate end line of folds.AnkushMalaker commentedon May 29, 2022
@psliwka Thanks, you're the MVP. It doesn't get stuck after the update. If it helps diagnose at all, I use fzf with nvim and whenever I got this cursor stuck issue, I couldn't open fzf. I get an error with something along the lines of "Can't exit terminal mode and go into normal mode". Best of luck and thanks again!