diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2019-05-25 17:45:35 +1200 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2019-05-25 17:48:30 +1200 |
commit | 0ec7dca913f416e9b9a592760bc10f85bd87e79a (patch) | |
tree | a71604f8e9769d24b4398f92a5407d7a83e0732f | |
parent | Move functions into autoload (diff) | |
download | vim-strip-trailing-whitespace-0ec7dca913f416e9b9a592760bc10f85bd87e79a.tar.gz vim-strip-trailing-whitespace-0ec7dca913f416e9b9a592760bc10f85bd87e79a.zip |
Inline backported s:Cursor() function
No longer required, having upped the minimum Vim version.
-rw-r--r-- | autoload/strip_trailing_whitespace.vim | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/autoload/strip_trailing_whitespace.vim b/autoload/strip_trailing_whitespace.vim index f7292b6..a4d4f91 100644 --- a/autoload/strip_trailing_whitespace.vim +++ b/autoload/strip_trailing_whitespace.vim @@ -21,7 +21,7 @@ function strip_trailing_whitespace#Strip(start, end) abort let changed = changed || horizontal > 0 " Return the cursor - call s:Cursor(line, col) + call cursor(line, col) " Report what changed let msg = horizontal.' trimmed' @@ -97,13 +97,3 @@ function s:StripVertical() abort return stripped endfunction - -" Position the cursor; use cursor() if we have it, :normal if not (Vim 6.0) -function s:Cursor(line, col) abort - if exists('*cursor') - return cursor(a:line, a:col) - else - execute 'normal! '.a:line.'G'.a:col.'|' - return 1 - endif -endfunction |