position cursor after the first heading and before “some more text”
Press gj 2x
Expected result
Cursor is positioned at the bottom of the file.
Actual result
Cursor jumps to above the heading but below the first line
Environment
SYSTEM INFO:
Obsidian version: v1.0.1
Installer version: v0.15.9
Operating system: Darwin Kernel Version 21.6.0: Mon Aug 22 20:19:52 PDT 2022; root:xnu-8020.140.49~2/RELEASE_ARM64_T6000 21.6.0
Login status: logged in
Catalyst license: vip
Insider build toggle: on
Live preview: on
Legacy editor: off
Base theme: dark
Community theme: none
Snippets enabled: 0
Restricted mode: on
RECOMMENDATIONS:
none
Additional information
This happens in both Live Preview and Source mode.
I believe this used to only happen with transcluded blocks at the end of a file pre-1.0.0
There are recent fixes for gj in the 1.0.1 release that appear to unlock this jumping behavior in all cases.
I saw this is also being discussed in Discord. Are you testing 1.0.1 already in alpha? I can’t reproduce this in 1.0.0, but while testing, I noticed if I move the cursor with the mouse it gets weird, and maybe it’s also related, or maybe 2 separate problems.
If I move the cursor with the mouse, gj and gk seem to remember where the cursor was before the mouse move, and moves to there instead.
If I move the cursor with the mouse, gj and gk seem to remember where the cursor was before the mouse move, and moves to there instead.
Oh interesting.
In previous versions of Obsidian (0.16x and on I think) I could only trigger this jumping behavior on gj around transclusions at the end of a file. With 1.0.1, it happens always.
The previous bug around bullets, transclusions, and gj movement still exists in 1.0.1
Only with inline title activated. When inline title is off, the cursor won’t move to the last visual line if the second to last visual wrapped line is longer than the last one.
I only have inline title enabled in sandbox (default of course).
With inline title deactivated, gj jumps to the second-to-last line for me, so repeated gj’s jump back and forth between the last and second-to-last lines.