Skip to content

Commit

Permalink
Fixed #123: Added missing new line. (#132)
Browse files Browse the repository at this point in the history
  • Loading branch information
Marcin Szamotulski authored Mar 11, 2018
1 parent 05a35fb commit 6d4a3cc
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions ftplugin/purescript_pscide.vim
Original file line number Diff line number Diff line change
Expand Up @@ -775,8 +775,8 @@ function! PSCIDEapplySuggestionPrime(key, cursor, silent)
let endColumn = range.endColumn
if startLine == endLine
let line = getline(startLine)
" remove trailing news lines
let replacement = substitute(replacement, '\_s*$', '\n', '')
" remove trailing new lines
let replacement = substitute(replacement, '\_s*$', "\n", '')
" add identation to each line (except first one)
" and remove trailing white space from each line
let RSpace = { line -> substitute(line, '\s*$', '', '') }
Expand All @@ -788,9 +788,9 @@ function! PSCIDEapplySuggestionPrime(key, cursor, silent)
\ "\n")
let cursor = getcurpos()
if startColumn == 1
let newLines = split(replacement . line[endColumn - 1:], "\n")
let newLines = split(replacement . "\n" . line[endColumn - 1:], "\n")
else
let newLines = split(line[0:startColumn - 2] . replacement . line[endColumn - 1:], "\n")
let newLines = split(line[0:startColumn - 2] . replacement . "\n" . line[endColumn - 1:], "\n")
endif
exe startLine . "d _"
call append(startLine - 1, newLines)
Expand Down

0 comments on commit 6d4a3cc

Please sign in to comment.