From 76f548a4765a95ee728ec65b84b8032170b483eb Mon Sep 17 00:00:00 2001 From: Jurica Bradaric Date: Sun, 13 Oct 2019 00:04:41 +0200 Subject: [PATCH] vim-patch:8.1.1729: heredoc with trim not properly handled in function Problem: Heredoc with trim not properly handled in function. Solution: Allow for missing indent. (FUJIWARA Takuya, closes vim/vim#4713) https://github.com/vim/vim/commit/ecaa75b4cea329a3902b8565e028b32279b8322b --- src/nvim/eval.c | 39 ++++++++++++++++++++++------------- src/nvim/testdir/test_let.vim | 9 ++++++++ 2 files changed, 34 insertions(+), 14 deletions(-) diff --git a/src/nvim/eval.c b/src/nvim/eval.c index 7db9386937..fd37e1001a 100644 --- a/src/nvim/eval.c +++ b/src/nvim/eval.c @@ -21297,8 +21297,6 @@ void ex_function(exarg_T *eap) bool overwrite = false; int indent; int nesting; - char_u *skip_until = NULL; - char_u *trimmed = NULL; dictitem_T *v; funcdict_T fudi; static int func_nr = 0; /* number for nameless function */ @@ -21308,6 +21306,9 @@ void ex_function(exarg_T *eap) hashitem_T *hi; linenr_T sourcing_lnum_off; linenr_T sourcing_lnum_top; + bool is_heredoc = false; + char_u *skip_until = NULL; + char_u *heredoc_trimmed = NULL; bool show_block = false; bool do_concat = true; @@ -21608,14 +21609,27 @@ void ex_function(exarg_T *eap) } if (skip_until != NULL) { - // Between ":append" and "." and between ":python <