summaryrefslogtreecommitdiff
path: root/src/input_handler.cc
diff options
context:
space:
mode:
authorFrank LENORMAND <lenormf@gmail.com>2017-06-23 15:09:18 +0300
committerFrank LENORMAND <lenormf@gmail.com>2017-06-23 15:12:23 +0300
commit6376aa6206aefb408fef75ecfb21648418656301 (patch)
tree8ea45cb5a9f431521e6373386cba3740170cfb3d /src/input_handler.cc
parentdc1b039282d3602d9074e18eac02527a882a4a9a (diff)
rc formatter: Make sure the formatter returned successfully
The previous implementation used to replace the contents of the buffer with whatever the `formatcmd` was returning, regardless of the exit code of the command, which led to the buffer being wiped out on error. This commit does the formatting in a temporary file, and only replaces the current buffer with the contents of the -formatted- temporary file if the `formatcmd` returned successfully. Fixes #1357
Diffstat (limited to 'src/input_handler.cc')
0 files changed, 0 insertions, 0 deletions