diff options
| author | Martin Bielik <martin.bielik@instea.sk> | 2024-12-05 20:37:24 +0100 |
|---|---|---|
| committer | Martin Bielik <martin.bielik@instea.sk> | 2024-12-05 20:37:24 +0100 |
| commit | 707947a8931e46effbd9120356e7c4ece6ff8628 (patch) | |
| tree | 001d7651f867212a2df29fb04985e82b9ffc4b32 | |
| parent | 4cb86362752de14d142bca796688af0bf9277215 (diff) | |
| download | vim-ai-707947a8931e46effbd9120356e7c4ece6ff8628.tar.gz | |
escaping error message
| -rw-r--r-- | py/utils.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/py/utils.py b/py/utils.py index 604494c..c2a1a63 100644 --- a/py/utils.py +++ b/py/utils.py @@ -241,9 +241,10 @@ def openai_request(url, data, options): yield openai_obj def print_info_message(msg): + escaped_msg = msg.replace("'", "`") vim.command("redraw") vim.command("echohl ErrorMsg") - vim.command(f"echomsg '{msg}'") + vim.command(f"echomsg '{escaped_msg}'") vim.command("echohl None") def parse_error_message(error): |