zz in Vim-mode
Is your feature request related to a problem? Please describe. In editor using vim-mode, the shortcur z-z (two times "z") does not work.
Describe the solution you'd like Vim-shortcut z-z moves the current line (with curser) to the middle of the screen.
Can you confirm a couple of details for this?
- Which platform and Markpad version are you using?
- In Vim mode, does pressing
zzdo nothing, move the cursor, insert text, or trigger another command? - Does this happen in both split view and editor-only mode?
That should make it easier to tell whether this is a missing Monaco Vim binding or a Markpad-level shortcut/focus issue.
Traced this to an upstream bug in monaco-vim 0.4.4 rather than anything in Markpad.
actions.scrollToCursor computes a pixel offset y and calls cm.moveCurrentLineTo(y). The adapter's moveCurrentLineTo(viewPosition) switches on the strings "top" / "center" / "bottom" and has no default branch, so a number never matches and the call silently does nothing.
It isn't only zz — zt, zb, z., z- and z<CR> are all dead for the same reason. Noted in #393 along with another Monaco-defaults problem.