diff options
author | 2018-10-17 14:52:45 -0400 | |
---|---|---|
committer | 2018-10-17 14:52:45 -0400 | |
commit | d4df6904a70b4b90f896ec8812a19368d2e04bdd (patch) | |
tree | 8ce337e9f8602982f0259030e40e9c6e36f34e89 /modules/textadept | |
parent | 3e8ea367d7ae1a6a9e6eb72c631713f02fa504ca (diff) | |
download | textadept-d4df6904a70b4b90f896ec8812a19368d2e04bdd.tar.gz textadept-d4df6904a70b4b90f896ec8812a19368d2e04bdd.zip |
When filtering text through shell commands, halt on non-zero status code.
Diffstat (limited to 'modules/textadept')
-rw-r--r-- | modules/textadept/editing.lua | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/modules/textadept/editing.lua b/modules/textadept/editing.lua index cf449234..98f8da93 100644 --- a/modules/textadept/editing.lua +++ b/modules/textadept/editing.lua @@ -603,6 +603,11 @@ function M.filter_through(command) p:write(output) p:close() output = p:read('a') or '' + if p:wait() ~= 0 then + ui.statusbar_text = string.format('"%s" %s', commands[i], + _L['returned non-zero status']) + return + end end buffer:replace_target(output:iconv('UTF-8', _CHARSET)) if s ~= e then |