obsidian-tasks icon indicating copy to clipboard operation
obsidian-tasks copied to clipboard

Cursor moves 13 characters to the right when toggle task as done

Open jdudleyie opened this issue 3 years ago • 1 comments
trafficstars

Expected Behavior

I expect that when I execute the command Tasks: Toggle task done that the cursor/caret position should not change after the task status has changed.

Current Behavior

When I execute the command Tasks: Toggle task done for a task which is not done (marking it done) the cursor position moves 13 characters to the right. (And to the left when "uncompleting" a task)

Steps to Reproduce

Happens on both edit/raw markdown mode and new live preview mode in new editor version.

Context (Environment)

  • Obsidian version: v0.13.8 (insider)
  • Tasks version: 1.4.1

Possible Solution

As the ✅ 2021-12-12 string which is added is 13 characters (including the preceding space) maybe it's something to do with this, that the saved cursor position is not stored correctly after the line is replaced, not sure.

jdudleyie avatar Dec 12 '21 11:12 jdudleyie

Thank you for the report @jdudleyie. I can reproduce the issue. Will be fixed when I have the time.

schemar avatar Dec 12 '21 11:12 schemar

This fix was just released in Tasks 1.13.1

claremacrae avatar Sep 05 '22 21:09 claremacrae