1
0
forked from aniani/vim

When 'formatexpr' evaluates to non-zero fall back to internal formatting, also

for "gq". (James Vega)
This commit is contained in:
Bram Moolenaar
2010-07-11 17:35:50 +02:00
parent 3acfc30409
commit 700303e8f7
3 changed files with 8 additions and 4 deletions

View File

@@ -4475,7 +4475,10 @@ op_formatexpr(oap)
redraw_curbuf_later(INVERTED);
# endif
(void)fex_format(oap->start.lnum, oap->line_count, NUL);
if (fex_format(oap->start.lnum, oap->line_count, NUL) != 0)
/* As documented: when 'formatexpr' returns non-zero fall back to
* internal formatting. */
op_format(oap, FALSE);
}
int