Skip to content

Commit

Permalink
Check for +textprop
Browse files Browse the repository at this point in the history
  • Loading branch information
AndrewRadev committed Sep 13, 2020
1 parent a2042cf commit ea78de9
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions autoload/sideways/new_item.vim
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ function! s:InsertBefore(item, delimiter_string, new_line)
let delimiter_string = a:delimiter_string
let new_line = a:new_line

if g:sideways_add_item_cursor_restore
if g:sideways_add_item_cursor_restore && has('+textprop')
call s:StorePosition()
endif

Expand All @@ -73,7 +73,7 @@ function! s:InsertBefore(item, delimiter_string, new_line)
endif

call sideways#util#SetPos(item.start_line, item.start_col)
if g:sideways_add_item_cursor_restore
if g:sideways_add_item_cursor_restore && has('+textprop')
call s:SetupRestorePosition()
endif

Expand All @@ -85,7 +85,7 @@ function! s:InsertAfter(item, delimiter_string, new_line)
let delimiter_string = a:delimiter_string
let new_line = a:new_line

if g:sideways_add_item_cursor_restore
if g:sideways_add_item_cursor_restore && has('+textprop')
call s:StorePosition()
endif

Expand All @@ -104,7 +104,7 @@ function! s:InsertAfter(item, delimiter_string, new_line)
call feedkeys('a', 'n')
endif

if g:sideways_add_item_cursor_restore
if g:sideways_add_item_cursor_restore && has('+textprop')
call s:SetupRestorePosition()
endif
endfunction
Expand Down

0 comments on commit ea78de9

Please sign in to comment.