Merge pull request #213 from Chiel92/only_write_changes
Check for changes before writing to buffer
This commit is contained in:
commit
c32b27cd40
@ -228,6 +228,7 @@ else:
|
|||||||
for eol in possible_eols:
|
for eol in possible_eols:
|
||||||
lines = [splitline for line in lines for splitline in line.split(eol)]
|
lines = [splitline for line in lines for splitline in line.split(eol)]
|
||||||
|
|
||||||
|
if vim.current.buffer[:] != lines:
|
||||||
vim.current.buffer[:] = lines
|
vim.current.buffer[:] = lines
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
@ -287,6 +288,7 @@ else:
|
|||||||
for eol in possible_eols:
|
for eol in possible_eols:
|
||||||
lines = [splitline for line in lines for splitline in line.split(eol)]
|
lines = [splitline for line in lines for splitline in line.split(eol)]
|
||||||
|
|
||||||
|
if vim.current.buffer[:] != lines:
|
||||||
vim.current.buffer[:] = lines
|
vim.current.buffer[:] = lines
|
||||||
vim.command('return 0')
|
vim.command('return 0')
|
||||||
EOF
|
EOF
|
||||||
|
Loading…
Reference in New Issue
Block a user