Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
45677139
Commit
45677139
authored
Nov 26, 2018
by
Thomas Pathier
Committed by
Phil Hughes
Nov 26, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
WebIDE: Make Ctrl+Enter automatically commit when commit textarea is focused
parent
10e4c873
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
20 additions
and
0 deletions
+20
-0
app/assets/javascripts/ide/components/commit_sidebar/form.vue
...assets/javascripts/ide/components/commit_sidebar/form.vue
+1
-0
app/assets/javascripts/ide/components/commit_sidebar/message_field.vue
...vascripts/ide/components/commit_sidebar/message_field.vue
+6
-0
app/views/help/_shortcuts.html.haml
app/views/help/_shortcuts.html.haml
+7
-0
changelogs/unreleased/46544-webide-ctrl-enter-commit-shortcut.yml
...gs/unreleased/46544-webide-ctrl-enter-commit-shortcut.yml
+5
-0
doc/workflow/shortcuts.md
doc/workflow/shortcuts.md
+1
-0
No files found.
app/assets/javascripts/ide/components/commit_sidebar/form.vue
View file @
45677139
...
@@ -126,6 +126,7 @@ export default {
...
@@ -126,6 +126,7 @@ export default {
:text=
"commitMessage"
:text=
"commitMessage"
:placeholder=
"preBuiltCommitMessage"
:placeholder=
"preBuiltCommitMessage"
@
input=
"updateCommitMessage"
@
input=
"updateCommitMessage"
@
submit=
"commitChanges"
/>
/>
<div
class=
"clearfix prepend-top-15"
>
<div
class=
"clearfix prepend-top-15"
>
<actions
/>
<actions
/>
...
...
app/assets/javascripts/ide/components/commit_sidebar/message_field.vue
View file @
45677139
...
@@ -49,6 +49,10 @@ export default {
...
@@ -49,6 +49,10 @@ export default {
onInput
(
e
)
{
onInput
(
e
)
{
this
.
$emit
(
'
input
'
,
e
.
target
.
value
);
this
.
$emit
(
'
input
'
,
e
.
target
.
value
);
},
},
onCtrlEnter
()
{
if
(
!
this
.
isFocused
)
return
;
this
.
$emit
(
'
submit
'
);
},
updateIsFocused
(
isFocused
)
{
updateIsFocused
(
isFocused
)
{
this
.
isFocused
=
isFocused
;
this
.
isFocused
=
isFocused
;
},
},
...
@@ -109,6 +113,8 @@ export default {
...
@@ -109,6 +113,8 @@ export default {
@
input=
"onInput"
@
input=
"onInput"
@
focus=
"updateIsFocused(true);"
@
focus=
"updateIsFocused(true);"
@
blur=
"updateIsFocused(false);"
@
blur=
"updateIsFocused(false);"
@
keydown.ctrl.enter=
"onCtrlEnter"
@
keydown.meta.enter=
"onCtrlEnter"
>
>
</textarea>
</textarea>
</div>
</div>
...
...
app/views/help/_shortcuts.html.haml
View file @
45677139
...
@@ -249,6 +249,13 @@
...
@@ -249,6 +249,13 @@
-
else
-
else
%kbd
ctrl p
%kbd
ctrl p
%td
Go to file
%td
Go to file
%tr
%td
.shortcut
-
if
browser
.
platform
.
mac?
%kbd
⌘
enter
-
else
%kbd
ctrl enter
%td
Commit (when editing commit message)
.col-lg-4
.col-lg-4
%table
.shortcut-mappings
%table
.shortcut-mappings
%tbody
.hidden-shortcut
{
style:
'display:none'
}
%tbody
.hidden-shortcut
{
style:
'display:none'
}
...
...
changelogs/unreleased/46544-webide-ctrl-enter-commit-shortcut.yml
0 → 100644
View file @
45677139
---
title
:
"
WebIDE:
Pressing
Ctrl-Enter
while
typing
on
the
commit
message
now
performs
the
commit
action"
merge_request
:
23049
author
:
Thomas Pathier
type
:
added
doc/workflow/shortcuts.md
View file @
45677139
...
@@ -94,3 +94,4 @@ You can see GitLab's keyboard shortcuts by using 'shift + ?'
...
@@ -94,3 +94,4 @@ You can see GitLab's keyboard shortcuts by using 'shift + ?'
| Keyboard Shortcut | Description |
| Keyboard Shortcut | Description |
| ----------------- | ----------- |
| ----------------- | ----------- |
|
<kbd>
Cmd
</kbd>
/
<kbd>
Ctrl
</kbd>
+
<kbd>
p
</kbd>
| Go to file |
|
<kbd>
Cmd
</kbd>
/
<kbd>
Ctrl
</kbd>
+
<kbd>
p
</kbd>
| Go to file |
|
<kbd>
Cmd
</kbd>
/
<kbd>
Ctrl
</kbd>
+
<kbd>
Enter
</kbd>
| Commit (when editing the commit message) |
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment