Alexander-Miller / treemacs

GNU General Public License v3.0
2.08k stars 152 forks source link

When do rename use cfrs, after editing done then pressing RET, highlight and cursor on the wrong line. #899

Closed zw963 closed 2 years ago

zw963 commented 2 years ago
  1. click on file name, ready to do rename use cfrs, see following screenshot.

image

  1. do rename, see following screenshot.

image

  1. after done, pressing RET to confirm rename operation.

  2. highlight and cursor on the wrong line (below original one), see following screenshot. image

stale[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

zw963 commented 2 years ago

keep

Alexander-Miller commented 2 years ago

I've no idea how this hasn't been noticed sooner. This bug is not about cfrs, but is a fundamental logic error - treemacs' own save-excursion implementation sees that file it was on no longer exists because it was renamed, so it falls back to one of its neighbours.

At any rate it's fixed now.