comparison src/memline.c @ 17364:31f31e938961 v8.1.1681

patch 8.1.1681: insert stray "{" when listener gets buffer line commit https://github.com/vim/vim/commit/0fb286e82d28730fcb3293894dd4df2e069eaf9a Author: Bram Moolenaar <Bram@vim.org> Date: Sat Jul 13 20:14:45 2019 +0200 patch 8.1.1681: insert stray "{" when listener gets buffer line Problem: Insert stray "{" when listener gets buffer line. (Paul Jolly) Solution: Flush the cached line after invoking listeners. (closes https://github.com/vim/vim/issues/4455)
author Bram Moolenaar <Bram@vim.org>
date Sat, 13 Jul 2019 20:15:04 +0200
parents d03a52e02f1a
children 9b6c0ef29c20
comparison
equal deleted inserted replaced
17363:b2a3efe4bc76 17364:31f31e938961
2834 if (len == 0) 2834 if (len == 0)
2835 len = (colnr_T)STRLEN(line) + 1; // space needed for the text 2835 len = (colnr_T)STRLEN(line) + 1; // space needed for the text
2836 2836
2837 #ifdef FEAT_EVAL 2837 #ifdef FEAT_EVAL
2838 // When inserting above recorded changes: flush the changes before changing 2838 // When inserting above recorded changes: flush the changes before changing
2839 // the text. 2839 // the text. Then flush the cached line, it may become invalid.
2840 may_invoke_listeners(buf, lnum + 1, lnum + 1, 1); 2840 may_invoke_listeners(buf, lnum + 1, lnum + 1, 1);
2841 if (curbuf->b_ml.ml_line_lnum != 0)
2842 ml_flush_line(curbuf);
2841 #endif 2843 #endif
2842 2844
2843 #ifdef FEAT_TEXT_PROP 2845 #ifdef FEAT_TEXT_PROP
2844 if (curbuf->b_has_textprop && lnum > 0) 2846 if (curbuf->b_has_textprop && lnum > 0)
2845 // Add text properties that continue from the previous line. 2847 // Add text properties that continue from the previous line.