Fire fish_posterror event on tokenization error (#6880)

* Fire fish_postexec event after tokenization error

This is a fix for issue #6816 "shell integration with tokenization error"

* Pass command-line to fish_postexec on tokenization error

* Rename and move event for tokenization error
This commit is contained in:
Per Bothner 2020-04-25 00:23:15 -07:00 committed by GitHub
parent d256ff84f7
commit a93ee3a4e9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2946,6 +2946,8 @@ void reader_data_t::handle_readline_command(readline_cmd_t c, readline_loop_stat
} else {
// Result must be some combination including an error. The error message will
// already be printed, all we need to do is repaint.
wcstring_list_t argv(1, el->text());
event_fire_generic(parser(), L"fish_posterror", &argv);
s_reset(&screen, screen_reset_abandon_line);
mark_repaint_needed();
}