Mercurial > vim
diff src/ex_docmd.c @ 19348:b6da81589f8c v8.2.0232
patch 8.2.0232: the :compiler command causes a crash
Commit: https://github.com/vim/vim/commit/165315584d6587e287f54d6c8820e050114b5694
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Feb 8 16:00:46 2020 +0100
patch 8.2.0232: the :compiler command causes a crash
Problem: The :compiler command causes a crash. (Daniel Steinberg)
Solution: Do not use the script index if it isn't set.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sat, 08 Feb 2020 16:15:04 +0100 |
parents | ebeeb4b4a1fa |
children | 90e24240904b |
line wrap: on
line diff
--- a/src/ex_docmd.c +++ b/src/ex_docmd.c @@ -2495,7 +2495,8 @@ do_one_cmd( #ifdef FEAT_EVAL // Set flag that any command was executed, used by ex_vim9script(). - if (getline_equal(ea.getline, ea.cookie, getsourceline)) + if (getline_equal(ea.getline, ea.cookie, getsourceline) + && current_sctx.sc_sid > 0) SCRIPT_ITEM(current_sctx.sc_sid)->sn_had_command = TRUE; /*