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

Feature Request: enable cntl/cmd-s hotkey when focus is in the commit message field. #1794

Open
magnusviri opened this issue Dec 23, 2021 · 4 comments

Comments

@magnusviri
Copy link
Contributor

cntl/cmd-s works great when I'm in the main body edit field. But when I click in the commit message field it no longer works. Please enable this.

Also, when I press "return" in the commit message field it switches focus to the main body edit field and adds "****", which seems odd.

@magnusviri
Copy link
Contributor Author

In fact, I would prefer that cmd-s in the main body edit field move focus to the commit field so that changes can't be saved unless a commit message is entered. Maybe this could be a command line setting?

@dometto
Copy link
Member

dometto commented May 26, 2022

cntl/cmd-s works great when I'm in the main body edit field. But when I click in the commit message field it no longer works. Please enable this.

This seems like a reasonable expectation. The problem at the moment is that the hotkey is defined only be the ace editor (the main editor, the other text fields are not Ace instances). But we can add the cmd/ctrl-s ourselves using Mousetrap. Something like this should work:

 Mousetrap( $("#gollum-editor-form")[0] ).bind(['command+s'], function() {
        $("#gollum-editor-submit").trigger("click");
        return false;
      });

In fact, I would prefer that cmd-s in the main body edit field move focus to the commit field so that changes can't be saved unless a commit message is entered. Maybe this could be a command line setting?

I thinkk a command line setting for that would be a bit overkill, but perhaps we could add another keyboard combination for moving to the commit field -- e.g. cmd-shift-s, or cmd-shift-c, depending on what's already in use by ace. Again, this could be achieved with Mousetrap.

Would you have time to submit a PR for these features, @magnusviri?

@magnusviri
Copy link
Contributor Author

magnusviri commented Jul 30, 2022

I just tried to compile gollum but I get an arm64 related error.

/Users/jeng/gollum/vendor/bundle/ruby/2.6.0/gems/nokogiri-1.13.8-x86_64-darwin/lib/nokogiri/extension.rb:7:in require_relative': dlopen(/Users/jeng/gollum/vendor/bundle/ruby/2.6.0/gems/nokogiri-1.13.8-x86_64-darwin/lib/nokogiri/2.6/nokogiri.bundle, 0x0009): tried: '/Users/jeng/gollum/vendor/bundle/ruby/2.6.0/gems/nokogiri-1.13.8-x86_64-darwin/lib/nokogiri/2.6/nokogiri.bundle' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64e')) - /Users/jeng/gollum/vendor/bundle/ruby/2.6.0/gems/nokogiri-1.13.8-x86_64-darwin/lib/nokogiri/2.6/nokogiri.bundle (LoadError)`

sparklemotion/nokogiri#2149

I learned Ruby over 10 years ago but haven't used it much since, so I'm not really a Ruby developer. I'm not quite sure how to solve this problem.

@benjaminwil
Copy link
Member

I am not sure how I would resolve that issue either...

Did you migrate your Ruby install from a x86-64 system to an arm64 system by chance? I wonder if it's just a matter of throwing away your vendor/bundle so that any dependencies with C extensions get rebuilt, etc?

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

No branches or pull requests

3 participants