diff options
author | Jan Edmund Lazo <jan.lazo@mail.utoronto.ca> | 2020-11-19 23:34:13 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-19 23:34:13 -0500 |
commit | 480b04122e93826bdfc74fbeacab2d94b089420f (patch) | |
tree | d393c07c56912ad066be833b5240a692e46640c6 /src/nvim/syntax.c | |
parent | da4e7ed4e9a24e451294c1fe396936d8a8d1f739 (diff) | |
parent | b0f967a06e6970df9dfa1803fd1cc72294d64dcd (diff) | |
download | rneovim-480b04122e93826bdfc74fbeacab2d94b089420f.tar.gz rneovim-480b04122e93826bdfc74fbeacab2d94b089420f.tar.bz2 rneovim-480b04122e93826bdfc74fbeacab2d94b089420f.zip |
Merge pull request #13321 from seandewar/vim-8.2.2011
vim-patch:8.2.{2006,2011}
Diffstat (limited to 'src/nvim/syntax.c')
-rw-r--r-- | src/nvim/syntax.c | 39 |
1 files changed, 24 insertions, 15 deletions
diff --git a/src/nvim/syntax.c b/src/nvim/syntax.c index 2e593e39de..5e54354ea8 100644 --- a/src/nvim/syntax.c +++ b/src/nvim/syntax.c @@ -3505,12 +3505,16 @@ syn_cmd_list( syn_match_msg(); return; } else if (!(curwin->w_s->b_syn_sync_flags & SF_MATCH)) { - if (curwin->w_s->b_syn_sync_minlines == 0) + if (curwin->w_s->b_syn_sync_minlines == 0) { MSG_PUTS(_("no syncing")); - else { - MSG_PUTS(_("syncing starts ")); - msg_outnum(curwin->w_s->b_syn_sync_minlines); - MSG_PUTS(_(" lines before top line")); + } else { + if (curwin->w_s->b_syn_sync_minlines == MAXLNUM) { + MSG_PUTS(_("syncing starts at the first line")); + } else { + MSG_PUTS(_("syncing starts ")); + msg_outnum(curwin->w_s->b_syn_sync_minlines); + MSG_PUTS(_(" lines before top line")); + } syn_match_msg(); } return; @@ -3566,17 +3570,22 @@ static void syn_lines_msg(void) if (curwin->w_s->b_syn_sync_maxlines > 0 || curwin->w_s->b_syn_sync_minlines > 0) { MSG_PUTS("; "); - if (curwin->w_s->b_syn_sync_minlines > 0) { - MSG_PUTS(_("minimal ")); - msg_outnum(curwin->w_s->b_syn_sync_minlines); - if (curwin->w_s->b_syn_sync_maxlines) - MSG_PUTS(", "); - } - if (curwin->w_s->b_syn_sync_maxlines > 0) { - MSG_PUTS(_("maximal ")); - msg_outnum(curwin->w_s->b_syn_sync_maxlines); + if (curwin->w_s->b_syn_sync_minlines == MAXLNUM) { + MSG_PUTS(_("from the first line")); + } else { + if (curwin->w_s->b_syn_sync_minlines > 0) { + MSG_PUTS(_("minimal ")); + msg_outnum(curwin->w_s->b_syn_sync_minlines); + if (curwin->w_s->b_syn_sync_maxlines) { + MSG_PUTS(", "); + } + } + if (curwin->w_s->b_syn_sync_maxlines > 0) { + MSG_PUTS(_("maximal ")); + msg_outnum(curwin->w_s->b_syn_sync_maxlines); + } + MSG_PUTS(_(" lines before top line")); } - MSG_PUTS(_(" lines before top line")); } } |