summaryrefslogtreecommitdiff
path: root/autoload
diff options
context:
space:
mode:
authorChristian Keil <keil@dfn-cert.de>2020-09-09 17:44:09 +0200
committerChristian Keil <keil@dfn-cert.de>2020-09-09 17:44:09 +0200
commitd3932c02424eec0520faa2afa42371c27122f5a7 (patch)
tree853deedb7440f8b8cf7896feed4cd242ae2d5484 /autoload
parent20f6bebdf22afca71b136a1ce8cff9f8b5ec7410 (diff)
downloadale-d3932c02424eec0520faa2afa42371c27122f5a7.zip
Fix format linting error.
Diffstat (limited to 'autoload')
-rw-r--r--autoload/ale/code_action.vim2
1 files changed, 2 insertions, 0 deletions
diff --git a/autoload/ale/code_action.vim b/autoload/ale/code_action.vim
index 849942ca..1959d1b1 100644
--- a/autoload/ale/code_action.vim
+++ b/autoload/ale/code_action.vim
@@ -127,6 +127,7 @@ function! ale#code_action#ApplyChanges(filename, changes, should_save) abort
endif
call extend(l:middle, l:insertions[1:])
+
if l:end_line <= len(l:lines)
" Only extend the last line if end_line is within the range of
" lines.
@@ -140,6 +141,7 @@ function! ale#code_action#ApplyChanges(filename, changes, should_save) abort
else
let l:end = []
endif
+
let l:lines = l:start + l:middle + l:end
let l:current_line_offset = len(l:lines) - l:lines_before_change