Skip to content

Not reset, i.e. preserve your cursor position/folds when switching Tabs #457

@mangelozzi

Description

@mangelozzi

Description

Annoying behavior of loosing your place when trying to copy multiple lines between a previous vesion of a file, and the current file. One has to keep finding the place where one was when switching between tabs, because DiffView does not keep track of where it was (or is forcing a reset).

Expected behavior

Preserve state when one switchs to a different tab and comes back.

Actual behavior

It resets/restart sitself just because I viewed a different Tab

Steps to reproduce

  1. Say you open DiffviewFileHistory %
  2. You remove all folds (zR)
  3. Scroll to the lines you are interested in.
  4. Copy a line of text
  5. Go back to the buffer you working on, i.e. gt -> goto next tab
  6. Paste the line, now gt to return to DiffView
  7. Boom diff view has reset itself, now repeat, steps 1 to 3 to try find where you were

Health check

N/A

Log info

Relevant info from :DiffviewLog
############################
### PUT LOG CONTENT HERE ###
############################

Neovim version

NVIM v0.10.0-dev-fcfc87c
Build type: RelWithDebInfo
LuaJIT 2.1.1695266395

Operating system and version

Linux 6.2.0-39-generic x86_64 GNU/Linux

Minimal config

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions