@@ -86,7 +86,7 @@ function! s:move_to_the_start_point()
86
86
if s: in_open_fold_p ()
87
87
call s: move_to_the_start_of_open_fold ()
88
88
elseif s: in_closed_fold_p ()
89
- " call s:move_to_the_start_of_closed_fold() " already at the point.
89
+ call s: move_to_the_start_of_closed_fold ()
90
90
else
91
91
call s: move_to_the_start_of_non_fold ()
92
92
endif
@@ -100,6 +100,10 @@ function! s:move_to_the_start_of_open_fold()
100
100
endif
101
101
endfunction
102
102
103
+ function ! s: move_to_the_start_of_closed_fold ()
104
+ call cursor (foldclosed (line (' .' )), 1 )
105
+ endfunction
106
+
103
107
function ! s: move_to_the_start_of_non_fold ()
104
108
let orig_line = line (' .' )
105
109
normal ! zk
@@ -115,7 +119,7 @@ function! s:move_to_the_end_point(mode, selection_starts_with_fold_p)
115
119
if s: in_open_fold_p ()
116
120
call s: move_to_the_end_of_open_fold ()
117
121
elseif s: in_closed_fold_p ()
118
- " call s:move_to_the_end_of_closed_fold() " already at the point.
122
+ call s: move_to_the_end_of_closed_fold ()
119
123
else
120
124
call s: move_to_the_end_of_non_fold ()
121
125
endif
@@ -163,6 +167,11 @@ function! s:move_to_the_end_of_open_fold()
163
167
endif
164
168
endfunction
165
169
170
+ function ! s: move_to_the_end_of_closed_fold ()
171
+ call cursor (foldclosedend (line (' .' )), 0 )
172
+ normal ! $
173
+ endfunction
174
+
166
175
function ! s: move_to_the_end_of_non_fold ()
167
176
let orig_line = line (' .' )
168
177
normal ! zj
0 commit comments