diff src/if_py_both.h @ 16688:e791f29affae v8.1.1346

patch 8.1.1346: error for Python exception does not show useful info commit https://github.com/vim/vim/commit/7f3a28490abb7c495239fc438825e3d1aaafa76d Author: Bram Moolenaar <Bram@vim.org> Date: Sat May 18 15:02:25 2019 +0200 patch 8.1.1346: error for Python exception does not show useful info Problem: Error for Python exception does not show useful info. Solution: Show the last line instead of the first one. (Ben Jackson, closes #4381)
author Bram Moolenaar <Bram@vim.org>
date Sat, 18 May 2019 15:15:05 +0200
parents 7e733046db1d
children 9aa87f5aab55
line wrap: on
line diff
--- a/src/if_py_both.h
+++ b/src/if_py_both.h
@@ -412,6 +412,8 @@ write_output(OutputObject *self, PyObjec
 
     Py_BEGIN_ALLOW_THREADS
     Python_Lock_Vim();
+    if (error)
+	emsg_severe = TRUE;
     writer((writefn)(error ? emsg : msg), (char_u *)str, len);
     Python_Release_Vim();
     Py_END_ALLOW_THREADS