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

"Stage Modified" hotkey on "Modified" (Ctrl + S) does not work #772

Closed
birgersp opened this Issue Mar 9, 2018 · 1 comment

Comments

Projects
None yet
2 participants
@birgersp

birgersp commented Mar 9, 2018

(Ubuntu 17.10 Gnome, 64-bit)

Steps to reproduce:

  1. Open git-cola in a repository with one or more tracked, modified and unstaged file(s)
  2. Focus the status widget by pressing Ctrl + K
  3. Arrow up/down to select the "Modified" item
  4. Press Ctrl + S, the modified files are not staged

If you right-click the "Modified" item, the menu shows an option to "Stage Modified". Clicking it works, so it seems that the error is with the bound hotkey.

( Loving git-cola, by the way! )

@davvid

This comment has been minimized.

Member

davvid commented Mar 17, 2018

Ah-ha, at first I thought I was unable to reproduce this because I was reading "Modified" item as meaning a modified file rather than the actual header item itself. I now realize you're talking about the header items.

Yeah, we don't do anything when the enclosing "Modified" header item is selected and Ctrl+S is pressed. That's currently by design but I think I've convinced myself that it's worth doing.

Some quick tips -- if you want to stage all modified files, and are not going to choose individual ones for staging, then you might as well just type a commit message and use the Ctrl+Enter hotkey to try to commit without staging anything. cola will detect that nothing is staged and prompt you asking if it should stage all files and commit -- hitting enter again will do so and complete the commit.

That's a quick way to do the same thing without having to focus the status tool.

The reason I've never really noticed this is because I never use the arrow keys. Have you considered using the j and k keys to navigate up and down? Those hotkeys skip over the modified/untracked/staged header items and jump only to specific files. I use those hotkeys exclusively so I only click on the "Modified" header item to see a diffstat. The j/k hotkeys are good because they keep you on the home row.

One reason why we might not want this is because we already provide an Alt+A hotkey that goes and stages all modified files. But, as you've suggested, having Ctrl+S work consistently seems like a simpler and better approach usability-wise.

Thanks for the sug, please test out the forthcoming commit.

@davvid davvid added the usability label Mar 17, 2018

@davvid davvid closed this in 21bb7d9 Mar 17, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment