1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-23 14:00:56 +01:00
phorge-phorge/webroot/rsrc/js/application/diffusion
epriestley 66566f878d Make "Open in Editor" use the simple line number of the current selected block
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).

Differential Revision: https://secure.phabricator.com/D21282
2020-05-21 15:31:16 -07:00
..
behavior-audit-preview.js Remove unused JavaScript variables. 2014-06-24 03:27:47 +10:00
behavior-commit-branches.js Various linter fixes. 2014-02-26 12:44:58 -08:00
behavior-commit-graph.js When drawing a very wide graph line diagram, smush it together a bit 2019-03-28 21:18:52 -07:00
behavior-locate-file.js Add a SublimeText-style repository typeahead 2014-05-13 14:08:21 -07:00
behavior-pull-lastmodified.js Make Diffusion "Last Modified" rendering less fragile 2015-10-07 07:32:27 -07:00
DiffusionLocateFileSource.js Fix spelling 2017-10-09 10:48:04 -07:00
ExternalEditorLinkEngine.js Make "Open in Editor" use the simple line number of the current selected block 2020-05-21 15:31:16 -07:00