Table cell editing uses invisible, normal-mode cursor in vim input mode
Description
When editing a table cell while Zettlr is using Vim input mode, the visible Vim cursor appears at the far left of the cell regardless of the actual text insertion position.
Typing inside the cell behaves as though Vim is permanently in Insert mode: text can be entered, but I cannot return to Normal mode or use normal Vim commands. At the same time, the visible block cursor does not appear to represent the actual editing position.
Instead, there appears to be a second, invisible text cursor. This invisible cursor can be moved using the arrow keys, mouse clicks, and text entry, and determines where characters are inserted or deleted. Because its position is not rendered visually, it is very difficult to determine where typing or backspacing will occur.
The behavior therefore appears to be roughly:
- A visible Vim-style block cursor is rendered at the left side of the table cell but does not track the actual insertion position.
- A separate functional text cursor controls editing but is invisible.
- Vim Normal mode commands do not appear to work while editing the cell.
- Clicking outside the table restores normal Vim-mode behavior.
As far as I have observed, this issue is specific to table cells; Vim mode works normally elsewhere in the editor.
If this is confirmed to be a Zettlr bug rather than something specific to my environment, I would be willing to investigate and submit a fix.
Reproducing
Normal behavior
- Leave Zettlr in its default input mode: Editor > Input Mode > Normal.
- Create a table and click inside one of its cells.
- Type some text and move the cursor using the arrow keys and mouse clicks.
- Observe that the visible cursor correctly tracks the insertion position and that text is inserted where the cursor appears.
Buggy behavior
- Change Zettlr's input mode to Editor > Input Mode > Vim.
- Create a table and click inside one of its cells.
- Attempt to use Vim Normal mode commands such as
h,j,k, orl. - Observe that these keys are inserted as text rather than being interpreted as Vim commands.
- Continue typing or move the insertion point using the arrow keys or mouse.
- Observe that text is inserted at the location of an invisible text cursor, while the visible Vim/block cursor does not track the actual insertion position.
The cursor-positioning issue is especially apparent when the table cell is set to center alignment: the visible Vim cursor remains incorrectly positioned while text editing occurs elsewhere within the cell.
Zettlr version
4.7.0
Installation Method
Homebrew
Installation Method (Other)
No response
Your Platform
- Windows
- macOS
- Linux
Architecture
- Intel 64bit
- ARM 64bit (includes Apple Silicon)
Operating System Version
MacOS Tahoe 26.5.2 (No crazy config or modified DE)
Additional Information
Source: Zettlr/Zettlr