aboutsummaryrefslogtreecommitdiff
path: root/modules/textadept
diff options
context:
space:
mode:
authormitchell <70453897+667e-11@users.noreply.github.com>2018-10-17 14:52:45 -0400
committermitchell <70453897+667e-11@users.noreply.github.com>2018-10-17 14:52:45 -0400
commitd4df6904a70b4b90f896ec8812a19368d2e04bdd (patch)
tree8ce337e9f8602982f0259030e40e9c6e36f34e89 /modules/textadept
parent3e8ea367d7ae1a6a9e6eb72c631713f02fa504ca (diff)
downloadtextadept-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.lua5
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