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
7ce760fa
Commit
7ce760fa
authored
9 years ago
by
Jerome Reybert
Browse files
Options
Downloads
Patches
Plain Diff
plugin/magit.vim: fix next/prev jump
parent
5d2c9417
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
+13
-11
13 additions, 11 deletions
plugin/magit.vim
with
13 additions
and
11 deletions
plugin/magit.vim
+
13
−
11
View file @
7ce760fa
...
@@ -927,18 +927,20 @@ function! magit#jump_hunk(dir)
...
@@ -927,18 +927,20 @@ function! magit#jump_hunk(dir)
let
back
=
(
a:dir
==
'P'
)
?
'b'
:
''
let
back
=
(
a:dir
==
'P'
)
?
'b'
:
''
let
line
=
search
(
"^@@ "
,
back
.
'wn'
)
let
line
=
search
(
"^@@ "
,
back
.
'wn'
)
if
(
line
!=
0
)
if
(
line
!=
0
)
if
(
foldlevel
(
line
(
'.'
))
==
2
)
try
try
foldclose
foldclose
catch
/^Vim\%((\a\+)\)\=:E490/
catch
/^Vim\%((\a\+)\)\=:E490/
endtry
endtry
endif
call
cursor
(
line
,
0
)
call
cursor
(
line
,
0
)
while
(
foldclosed
(
line
)
!=
-1
)
try
try
foldopen
foldopen
catch
/^Vim\%((\a\+)\)\=:E490/
catch
/^Vim\%((\a\+)\)\=:E490/
echohl WarningMsg
break
echom
"Warning: you should have jumped on a folded hunk"
echohl None
endtry
endtry
endwhile
endif
endif
endfunction
endfunction
...
...
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