Fix marker adjustment on gll
This commit is contained in:
parent
8744a31031
commit
813b3bb5a3
@ -981,17 +981,13 @@ function! s:get_a_neighbor_item(item) "{{{
|
|||||||
endfunction "}}}
|
endfunction "}}}
|
||||||
|
|
||||||
"sets kind of the item depending on neighbor items and the parent item
|
"sets kind of the item depending on neighbor items and the parent item
|
||||||
function! s:adjust_mrkr(item, look_above_and_below) "{{{
|
function! s:adjust_mrkr(item) "{{{
|
||||||
if a:item.type == 0 || VimwikiGet('syntax') == 'media'
|
if a:item.type == 0 || VimwikiGet('syntax') == 'media'
|
||||||
return
|
return
|
||||||
endif
|
endif
|
||||||
|
|
||||||
let new_mrkr = a:item.mrkr
|
let new_mrkr = a:item.mrkr
|
||||||
if a:look_above_and_below
|
let neighbor_item = s:get_a_neighbor_item(a:item)
|
||||||
let neighbor_item = s:get_a_neighbor_item(a:item)
|
|
||||||
else
|
|
||||||
let neighbor_item = s:get_prev_list_item(a:item, 1)
|
|
||||||
endif
|
|
||||||
if neighbor_item.type != 0
|
if neighbor_item.type != 0
|
||||||
let new_mrkr = neighbor_item.mrkr
|
let new_mrkr = neighbor_item.mrkr
|
||||||
endif
|
endif
|
||||||
@ -1042,7 +1038,9 @@ function! s:change_level(from_line, to_line, direction, plus_children) "{{{
|
|||||||
let cur_ln = s:get_next_line(cur_ln, 1)
|
let cur_ln = s:get_next_line(cur_ln, 1)
|
||||||
endwhile
|
endwhile
|
||||||
|
|
||||||
call s:adjust_mrkr(from_item, (a:from_line == a:to_line))
|
if a:from_line == a:to_line
|
||||||
|
call s:adjust_mrkr(from_item)
|
||||||
|
endif
|
||||||
call s:update_state(old_parent)
|
call s:update_state(old_parent)
|
||||||
let from_item = s:get_item(from_item.lnum)
|
let from_item = s:get_item(from_item.lnum)
|
||||||
if s:get_rate(from_item) < 100
|
if s:get_rate(from_item) < 100
|
||||||
@ -1054,6 +1052,7 @@ function! s:change_level(from_line, to_line, direction, plus_children) "{{{
|
|||||||
if more_than_one_level_concerned
|
if more_than_one_level_concerned
|
||||||
call vimwiki#lst#adjust_whole_buffer()
|
call vimwiki#lst#adjust_whole_buffer()
|
||||||
else
|
else
|
||||||
|
call s:adjust_numbered_list(from_item, 0, 0)
|
||||||
call s:adjust_numbered_list(to_be_adjusted, 0, 0)
|
call s:adjust_numbered_list(to_be_adjusted, 0, 0)
|
||||||
endif
|
endif
|
||||||
endfunction "}}}
|
endfunction "}}}
|
||||||
|
Loading…
Reference in New Issue
Block a user