Page MenuHomePhabricator

Make "Open in Editor" use the simple line number of the current selected block
ClosedPublic

Authored by epriestley on May 21 2020, 9:30 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Mar 21, 2:57 AM
Unknown Object (File)
Feb 3 2024, 7:05 PM
Unknown Object (File)
Jan 31 2024, 5:20 AM
Unknown Object (File)
Jan 6 2024, 8:37 PM
Unknown Object (File)
Dec 25 2023, 10:34 AM
Unknown Object (File)
Dec 24 2023, 12:08 AM
Unknown Object (File)
Dec 19 2023, 4:00 AM
Unknown Object (File)
Dec 3 2023, 12:35 PM
Subscribers
None

Details

Summary

Ref PHI1749. Instead of opening files to the last unchanged line on either side of the change, open files to the "simple" line number of the selected block.

For inlines, this is the inline line number.

For blocks, this is the first new-file line number, or the first old-file line number if no new-file line number exists in the block.

This may not always be what the user is hoping for (we can't know what the state of their working copy is) but should produce more obvious behavior.

Test Plan
  • In Diffusion, used "Open in Editor" with and without line selections. Saw same behavior as before.
  • Used "n" and "r" to leave an inline with the keyboard, saw same behavior as before.
  • Used "\" and "Open in Editor" menu item to open a file with:
    • Nothing selected or changeset selected (line: 1).
    • An inline selected (line: inline line).
    • A block selected (line: first line in block, per above).

Diff Detail

Repository
rP Phabricator
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

epriestley created this revision.
  • Remove debugging code.
  • Ignore selected elements that are not part of the current changeset.
This revision was not accepted when it landed; it landed in state Needs Review.May 21 2020, 10:31 PM
This revision was automatically updated to reflect the committed changes.