comparison src/indent.c @ 25445:65f04b6effd5 v8.2.3259

patch 8.2.3259: when 'indentexpr' causes an error did_throw may hang Commit: https://github.com/vim/vim/commit/620c959c6c00e469c4d3b1ab2e08e4767ee142a4 Author: Bram Moolenaar <Bram@vim.org> Date: Sat Jul 31 21:32:31 2021 +0200 patch 8.2.3259: when 'indentexpr' causes an error did_throw may hang Problem: When 'indentexpr' causes an error the did_throw flag may remain set. Solution: Reset did_throw and show the error. (closes #8677)
author Bram Moolenaar <Bram@vim.org>
date Sat, 31 Jul 2021 21:45:04 +0200
parents e8e2c4d33b9b
children 357a3bee56f5
comparison
equal deleted inserted replaced
25444:c80bfd306c7d 25445:65f04b6effd5
1819 curwin->w_cursor = save_pos; 1819 curwin->w_cursor = save_pos;
1820 curwin->w_curswant = save_curswant; 1820 curwin->w_curswant = save_curswant;
1821 curwin->w_set_curswant = save_set_curswant; 1821 curwin->w_set_curswant = save_set_curswant;
1822 check_cursor(); 1822 check_cursor();
1823 State = save_State; 1823 State = save_State;
1824
1825 // Reset did_throw, unless 'debug' has "throw" and inside a try/catch.
1826 if (did_throw && (vim_strchr(p_debug, 't') == NULL || trylevel == 0))
1827 {
1828 handle_did_throw();
1829 did_throw = FALSE;
1830 }
1824 1831
1825 // If there is an error, just keep the current indent. 1832 // If there is an error, just keep the current indent.
1826 if (indent < 0) 1833 if (indent < 0)
1827 indent = get_indent(); 1834 indent = get_indent();
1828 1835