Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix hotkey problems #453

Merged
merged 6 commits into from
Apr 10, 2024
Merged

Conversation

ssvine
Copy link
Contributor

@ssvine ssvine commented Apr 9, 2024

This pull request fixes many problems regarding hotkeys. Summary of the fixed problems:

  1. Many hotkeys processed by the plugin are ambiguous due to inconsistent checks. For example, Ctrl-G (Apply command) can also be processed as Ctrl-Alt-G or Ctrl-Shift-G.
  2. Insert full file name action (bound to Ctrl-F hotkey) inserts full file name as a "session url" like ssh://user@localhost:22/tmp/abc.txt which is not actually the full file name. Several issues were created to argue with such a behaviour. This pull request provides a better alternative - release Ctrl-F hotkey and bind the action to Ctrl-Alt-F.
  3. Aforementioned insert full file name action inserts empty prefixes for all protocols except scp / sftp.
  4. A hotkey Ctrl-; (Ctrl-Alt-;) shows incorrect results and may lead to a crash.
  5. NetBox binds two hotkeys to one action (Ctrl-Alt-Ins, Alt-Shift-Ins) not allowing Far to provide a different alternative action. It's better to keep only one hotkey (Alt-Shift-Ins), thereby allowing users to use both actions.
  6. Unable to show command menu (Alt-Shift-W) when editing a file.
  7. Edit history selects the wrong file (multiedit mode is on).
  8. Synchronize checklist misses Alt modifier in Alt-Right hotkey (horizontal scrolling), also horizontal scrolling is not working.

Pos. 2 mention this issues: 1 and 2

New hotkey is Ctrl-Alt-F in order not to interfere with more common usage.
Also fix broken protocol prefixes.
Now Far can use Ctrl-Alt-Ins as usual.
Alt-Shift-Ins is retained to provide the old functionality.
Crash happens because Far translates the hotkey to Ctrl-Alt-F while plugin panel is passive which is not handled properly.
Cause: EditHistory calls MultipleEdit with arguments that are passed by reference and will be implicitly substituted in FEditHistories.push_back.
Copy link

sonarcloud bot commented Apr 9, 2024

Quality Gate Passed Quality Gate passed

Issues
4 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

@michaellukashov michaellukashov merged commit c60918f into michaellukashov:main Apr 10, 2024
2 checks passed
@ssvine ssvine deleted the fix-hotkeys branch April 10, 2024 16:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants