mirror of
https://github.com/preservim/nerdcommenter.git
synced 2025-11-08 18:03:46 -05:00
Remove trailing whitespace for top and bottom line (#269)
Fixes #268 Remove trailing whitespace for top and bottom line when uncommenting a sexy commented block.
This commit is contained in:
committed by
Caleb Maclennan
parent
e1af5dae7d
commit
ecdde217c0
@@ -1620,6 +1620,16 @@ function s:UncommentLinesSexy(topline, bottomline)
|
|||||||
let theLine = s:SwapOuterPlaceHoldersForMultiPartDelims(theLine)
|
let theLine = s:SwapOuterPlaceHoldersForMultiPartDelims(theLine)
|
||||||
call setline(bottomline, theLine)
|
call setline(bottomline, theLine)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
" remove trailing whitespaces for first and last line
|
||||||
|
if g:NERDTrimTrailingWhitespace == 1
|
||||||
|
let theLine = getline(a:bottomline)
|
||||||
|
let theLine = s:TrimTrailingWhitespace(theLine)
|
||||||
|
call setline(a:bottomline, theLine)
|
||||||
|
let theLine = getline(a:topline)
|
||||||
|
let theLine = s:TrimTrailingWhitespace(theLine)
|
||||||
|
call setline(a:topline, theLine)
|
||||||
|
endif
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
" Function: s:UncommentLineNormal(line) {{{2
|
" Function: s:UncommentLineNormal(line) {{{2
|
||||||
|
|||||||
Reference in New Issue
Block a user