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
9fecf462
Commit
9fecf462
authored
9 years ago
by
Jerome Reybert
Browse files
Options
Downloads
Patches
Plain Diff
autoload/magit/utils.vim: really fix peculiar folding opening (for real this time!)
parent
9bdea8da
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
autoload/magit/utils.vim
+4
-1
4 additions, 1 deletion
autoload/magit/utils.vim
with
4 additions
and
1 deletion
autoload/magit/utils.vim
+
4
−
1
View file @
9fecf462
...
...
@@ -34,11 +34,14 @@ endfunction
" Use this function with caution: to be effective, the undo must be ack'ed
" with a change. The hack is the line
" exe "normal a \<BS>\<Esc>"
"
If the cursor is on a closed folding, it will open it!
"
We move on first line to make this trick where it should be no folding
function
!
magit#utils#clear_undo
()
let
old_undolevels
=
&
l
:
undolevels
let
cur_pos
=
line
(
'.'
)
setlocal
undolevels
=
-1
call
cursor
(
1
,
0
)
exe
"normal a \<BS>\<Esc>"
call
cursor
(
cur_pos
,
0
)
let
&
l
:
undolevels
=
old_undolevels
unlet old_undolevels
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