repl: Handle ^C while rendering the result
@@ -392,6 +392,7 @@ class Cli:
continue
max_width = self.prompt.output.get_size().columns
+ try:
for result, status in results:
if status in STATUSES_WITH_OUTPUT:
if qm is context.QueryMode.JSON:
@@ -406,6 +407,12 @@ class Cli:
max_width=min(max_width, 120))
else:
render.render_status(self.context, status)
+ except KeyboardInterrupt:
+ print('\r', end='')
+ render.render_error(
+ self.context,
+ '== aborting rendering of the result ==')
+ continue
except EOFError:
return
