Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
vimagit
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package registry
Model registry
Operate
Terraform modules
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
GitHub Mirror
jreybert
vimagit
Commits
f4b2053f
Commit
f4b2053f
authored
Sep 29, 2017
by
NTCong
Committed by
Jerome Reybert
Oct 2, 2017
Browse files
Options
Downloads
Patches
Plain Diff
only set autocmd once for write command checking
parent
42b014bd
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
plugin/magit.vim
+3
-0
3 additions, 0 deletions
plugin/magit.vim
with
3 additions
and
0 deletions
plugin/magit.vim
+
3
−
0
View file @
f4b2053f
...
@@ -807,6 +807,8 @@ function! magit#show_magit(display, ...)
...
@@ -807,6 +807,8 @@ function! magit#show_magit(display, ...)
let
&
l
:
foldlevel
=
b:magit_default_fold_level
let
&
l
:
foldlevel
=
b:magit_default_fold_level
setlocal
filetype
=
magit
setlocal
filetype
=
magit
augroup vimagit_buffer
autocmd
!
" catch write command
" catch write command
execute
"autocmd BufWriteCmd "
.
buffer_name
.
" :call magit#commit_command('CC')"
execute
"autocmd BufWriteCmd "
.
buffer_name
.
" :call magit#commit_command('CC')"
...
@@ -823,6 +825,7 @@ function! magit#show_magit(display, ...)
...
@@ -823,6 +825,7 @@ function! magit#show_magit(display, ...)
\
b:magit_current_commit_mode
!=
''
)
|
\
b:magit_current_commit_mode
!=
''
)
|
\
call
s:set_mode_read
()
|
\
call
s:set_mode_read
()
|
\
endif
"
\
endif
"
augroup END
let
b:state
=
deepcopy
(
g:magit
#
state
#
state
)
let
b:state
=
deepcopy
(
g:magit
#
state
#
state
)
" s:magit_commit_mode: global variable which states in which commit mode we are
" s:magit_commit_mode: global variable which states in which commit mode we are
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment