diff options
author | 2018-10-17 14:52:45 -0400 | |
---|---|---|
committer | 2018-10-17 14:52:45 -0400 | |
commit | d4df6904a70b4b90f896ec8812a19368d2e04bdd (patch) | |
tree | 8ce337e9f8602982f0259030e40e9c6e36f34e89 | |
parent | 3e8ea367d7ae1a6a9e6eb72c631713f02fa504ca (diff) | |
download | textadept-d4df6904a70b4b90f896ec8812a19368d2e04bdd.tar.gz textadept-d4df6904a70b4b90f896ec8812a19368d2e04bdd.zip |
When filtering text through shell commands, halt on non-zero status code.
-rw-r--r-- | core/locale.conf | 3 | ||||
-rw-r--r-- | core/locales/locale.ar.conf | 3 | ||||
-rw-r--r-- | core/locales/locale.de.conf | 3 | ||||
-rw-r--r-- | core/locales/locale.es.conf | 3 | ||||
-rw-r--r-- | core/locales/locale.fr.conf | 3 | ||||
-rw-r--r-- | core/locales/locale.it.conf | 3 | ||||
-rw-r--r-- | core/locales/locale.pl.conf | 3 | ||||
-rw-r--r-- | core/locales/locale.ru.conf | 3 | ||||
-rw-r--r-- | core/locales/locale.sv.conf | 3 | ||||
-rw-r--r-- | core/locales/locale.zh.conf | 3 | ||||
-rw-r--r-- | modules/textadept/editing.lua | 5 |
11 files changed, 35 insertions, 0 deletions
diff --git a/core/locale.conf b/core/locale.conf index 589322a6..efc5b43a 100644 --- a/core/locale.conf +++ b/core/locale.conf @@ -86,6 +86,9 @@ Bookmark = Bookmark # The text displayed in the dialog for jumping to a particular line. Go To = Go To Line Number: = Line Number: +# The statusbar message displayed when a shell command used to filter text +# through returns a non-zero status (indicating failure). +returned non-zero status = returned non-zero status # [modules/textadept/find.lua] # The text displayed in the GUI find & replace pane. diff --git a/core/locales/locale.ar.conf b/core/locales/locale.ar.conf index 64d5bbc9..33e2480e 100644 --- a/core/locales/locale.ar.conf +++ b/core/locales/locale.ar.conf @@ -86,6 +86,9 @@ Bookmark = إشارة # The text displayed in the dialog for jumping to a particular line. Go To = اذهب إلى Line Number: = رقم السطر: +# The statusbar message displayed when a shell command used to filter text +# through returns a non-zero status (indicating failure). +returned non-zero status = returned non-zero status # [modules/textadept/find.lua] # The text displayed in the GUI find & replace pane. diff --git a/core/locales/locale.de.conf b/core/locales/locale.de.conf index 6b3c4876..8dc0ffb1 100644 --- a/core/locales/locale.de.conf +++ b/core/locales/locale.de.conf @@ -86,6 +86,9 @@ Bookmark = Lesezeichen # The text displayed in the dialog for jumping to a particular line. Go To = Gehe zu Line Number: = Zeilennummer: +# The statusbar message displayed when a shell command used to filter text +# through returns a non-zero status (indicating failure). +returned non-zero status = returned non-zero status # [modules/textadept/find.lua] # The text displayed in the GUI find & replace pane. diff --git a/core/locales/locale.es.conf b/core/locales/locale.es.conf index 74958de0..fe17c380 100644 --- a/core/locales/locale.es.conf +++ b/core/locales/locale.es.conf @@ -86,6 +86,9 @@ Bookmark = Marcador # The text displayed in the dialog for jumping to a particular line. Go To = Ir a Line Number: = Número de línea: +# The statusbar message displayed when a shell command used to filter text +# through returns a non-zero status (indicating failure). +returned non-zero status = returned non-zero status # [modules/textadept/find.lua] # The text displayed in the GUI find & replace pane. diff --git a/core/locales/locale.fr.conf b/core/locales/locale.fr.conf index eb17d1dc..5e2e823f 100644 --- a/core/locales/locale.fr.conf +++ b/core/locales/locale.fr.conf @@ -87,6 +87,9 @@ Bookmark = Signet # The text displayed in the dialog for jumping to a particular line. Go To = Aller à Line Number: = Numéro de ligne: +# The statusbar message displayed when a shell command used to filter text +# through returns a non-zero status (indicating failure). +returned non-zero status = returned non-zero status # [modules/textadept/find.lua] # The text displayed in the GUI find & replace pane. diff --git a/core/locales/locale.it.conf b/core/locales/locale.it.conf index e338537b..bc6f3726 100644 --- a/core/locales/locale.it.conf +++ b/core/locales/locale.it.conf @@ -86,6 +86,9 @@ Bookmark = Segnalibro # The text displayed in the dialog for jumping to a particular line. Go To = Vai a Line Number: = Numero di linea: +# The statusbar message displayed when a shell command used to filter text +# through returns a non-zero status (indicating failure). +returned non-zero status = returned non-zero status # [modules/textadept/find.lua] # The text displayed in the GUI find & replace pane. diff --git a/core/locales/locale.pl.conf b/core/locales/locale.pl.conf index 72f581c6..42bfee0a 100644 --- a/core/locales/locale.pl.conf +++ b/core/locales/locale.pl.conf @@ -87,6 +87,9 @@ Bookmark = Zakładka # The text displayed in the dialog for jumping to a particular line. Go To = Idź do Line Number: = Numer wiersza: +# The statusbar message displayed when a shell command used to filter text +# through returns a non-zero status (indicating failure). +returned non-zero status = returned non-zero status # [modules/textadept/find.lua] # The text displayed in the GUI find & replace pane. diff --git a/core/locales/locale.ru.conf b/core/locales/locale.ru.conf index c4e8f014..016dd3c2 100644 --- a/core/locales/locale.ru.conf +++ b/core/locales/locale.ru.conf @@ -86,6 +86,9 @@ Bookmark = Закладки # The text displayed in the dialog for jumping to a particular line. Go To = Перейти к Line Number: = Номер строки: +# The statusbar message displayed when a shell command used to filter text +# through returns a non-zero status (indicating failure). +returned non-zero status = returned non-zero status # [modules/textadept/find.lua] # The text displayed in the GUI find & replace pane. diff --git a/core/locales/locale.sv.conf b/core/locales/locale.sv.conf index 579602a4..a304803d 100644 --- a/core/locales/locale.sv.conf +++ b/core/locales/locale.sv.conf @@ -86,6 +86,9 @@ Bookmark = Bokmärke # The text displayed in the dialog for jumping to a particular line. Go To = Gå till Line Number: = Radnummer: +# The statusbar message displayed when a shell command used to filter text +# through returns a non-zero status (indicating failure). +returned non-zero status = returned non-zero status # [modules/textadept/find.lua] # The text displayed in the GUI find & replace pane. diff --git a/core/locales/locale.zh.conf b/core/locales/locale.zh.conf index de0566e2..a40cc0c7 100644 --- a/core/locales/locale.zh.conf +++ b/core/locales/locale.zh.conf @@ -86,6 +86,9 @@ Bookmark = 书签 # The text displayed in the dialog for jumping to a particular line. Go To = Go To Line Number: = 行号: +# The statusbar message displayed when a shell command used to filter text +# through returns a non-zero status (indicating failure). +returned non-zero status = returned non-zero status # [modules/textadept/find.lua] # The text displayed in the GUI find & replace pane. 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 |