aboutsummaryrefslogtreecommitdiff
path: root/autoload
diff options
context:
space:
mode:
authorSam Howie <showie@fb.com>2018-05-25 11:37:04 -0700
committerSam Howie <showie@fb.com>2018-05-25 11:37:04 -0700
commit13d6948ca17540a2c480812f7d39d1b5ba102a38 (patch)
tree328c1b60101b7eec45c38473f07f3a2045d74462 /autoload
parent62fdd10233a0ad8da88e02a4d7e3c476da57859c (diff)
downloadvim-prettier-13d6948ca17540a2c480812f7d39d1b5ba102a38.tar.xz
Remove trailing empty line introduced by append
Diffstat (limited to 'autoload')
-rw-r--r--autoload/prettier.vim5
1 files changed, 4 insertions, 1 deletions
diff --git a/autoload/prettier.vim b/autoload/prettier.vim
index f00426e..dcd9926 100644
--- a/autoload/prettier.vim
+++ b/autoload/prettier.vim
@@ -285,7 +285,10 @@ function! s:Apply_Prettier_Format(lines, startSelection, endSelection) abort
silent! call append(l:idx, l:line)
let l:idx += 1
endfor
-
+
+ " delete trailing newline introduced by the above append procedure
+ silent! execute '$delete _'
+
" Restore view
call winrestview(l:winview)
endfunction