Skip to content
GitLab
    • GitLab: the DevOps platform
    • Explore GitLab
    • Install GitLab
    • How GitLab compares
    • Get started
    • GitLab docs
    • GitLab Learn
  • Pricing
  • Talk to an expert
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
    • Switch to GitLab Next
    Projects Groups Topics Snippets
  • Register
  • Sign in
  • TortoiseGit TortoiseGit
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
    • Locked files
  • Issues 382
    • Issues 382
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 16
    • Merge requests 16
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test cases
  • Deployments
    • Deployments
    • Releases
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • TortoiseGitTortoiseGit
  • TortoiseGitTortoiseGit
  • Issues
  • #3695
Closed
Open
Issue created Jan 15, 2021 by blackboxlogic@blackboxlogic

Keep the current line in the view when resizing with line-wrap on in TortoiseGitMerge

What steps will reproduce the problem?

  1. Diff a file which is "tall" and "wide" (many lines, and long lines)
  2. Turn on "Wrap Lines" so "wide" lines of text which don't fit horizontally are wrapped to the next line
  3. Scroll down to the middle of the document, note where you are in the document (line number)
  4. Change the width of the window (most obvious when switching to/from maximized)
  5. Note that your position in the document changes wildly, and you lose your place
  6. Experience sadness

What is the expected output? What do you see instead?

I expect changing window width to not effect the current vertical position in the file. The top line (and line number) that I can see should not change.

What version of TortoiseGit and Git are you using? On what operating system?

  • TortoiseGitMerge 2.11.0.0 - 64 Bit, Oct 10 2020
  • On Windows 10 Pro (version 2004 build 19041.746)

Please provide any additional information below.

If you implement this, there will be an edge case when the top visible line is a line-part. I think this fix would be great no matter how you handle that edge case. But ideally, I suggest maintaining position as "current visible line number" plus "current visible line parts". If the number of line parts becomes less than the previous "current visible line parts", then move to the highest existing line part.

Edited Mar 06, 2021 by Sven Strickroth
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking