diff options
| author | Justin M. Keyes <justinkz@gmail.com> | 2020-03-01 23:23:50 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-03-01 23:23:50 -0800 |
| commit | 0110735547bc5a491eff195096ba93e3ddefb19f (patch) | |
| tree | aad45b055941ef137d86494b534a7b53e5ac38ec /src/nvim/screen.c | |
| parent | 5e0c435ca1b711e80f78429431b4d400d789c618 (diff) | |
| parent | f1923d4b92239ef2ca280bf1ce6c5f6cc7cb4f1a (diff) | |
| download | rneovim-0110735547bc5a491eff195096ba93e3ddefb19f.tar.gz rneovim-0110735547bc5a491eff195096ba93e3ddefb19f.tar.bz2 rneovim-0110735547bc5a491eff195096ba93e3ddefb19f.zip | |
Merge #11929 from janlazo/vim-8.1.1510
vim-patch:8.0.1587,8.1.{253,881,883,885,896,939,1107,1108,1466,1489,1510,1552,1642,1793},8.2.{108,133,135}
Diffstat (limited to 'src/nvim/screen.c')
| -rw-r--r-- | src/nvim/screen.c | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/src/nvim/screen.c b/src/nvim/screen.c index b6da02d9c3..4cdfec9670 100644 --- a/src/nvim/screen.c +++ b/src/nvim/screen.c @@ -334,10 +334,10 @@ int update_screen(int type) } return FAIL; } + updating_screen = 1; - updating_screen = TRUE; - ++display_tick; /* let syntax code know we're in a next round of - * display updating */ + display_tick++; // let syntax code know we're in a next round of + // display updating // Tricky: vim code can reset msg_scrolled behind our back, so need // separate bookkeeping for now. @@ -565,7 +565,7 @@ int update_screen(int type) wp->w_buffer->b_mod_set = false; } - updating_screen = FALSE; + updating_screen = 0; /* Clear or redraw the command line. Done last, because scrolling may * mess up the command line. */ @@ -2215,9 +2215,10 @@ win_line ( int n_skip = 0; /* nr of chars to skip for 'nowrap' */ - int fromcol = 0, tocol = 0; // start/end of inverting + int fromcol = -10; // start of inverting + int tocol = MAXCOL; // end of inverting int fromcol_prev = -2; // start of inverting after cursor - int noinvcur = false; // don't invert the cursor + bool noinvcur = false; // don't invert the cursor pos_T *top, *bot; int lnum_in_visual_area = false; pos_T pos; @@ -2416,27 +2417,26 @@ win_line ( capcol_lnum = 0; } - // - // handle visual active in this window - // - fromcol = -10; - tocol = MAXCOL; + // handle Visual active in this window if (VIsual_active && wp->w_buffer == curwin->w_buffer) { - // Visual is after curwin->w_cursor if (ltoreq(curwin->w_cursor, VIsual)) { + // Visual is after curwin->w_cursor top = &curwin->w_cursor; bot = &VIsual; - } else { // Visual is before curwin->w_cursor + } else { + // Visual is before curwin->w_cursor top = &VIsual; bot = &curwin->w_cursor; } lnum_in_visual_area = (lnum >= top->lnum && lnum <= bot->lnum); - if (VIsual_mode == Ctrl_V) { // block mode + if (VIsual_mode == Ctrl_V) { + // block mode if (lnum_in_visual_area) { fromcol = wp->w_old_cursor_fcol; tocol = wp->w_old_cursor_lcol; } - } else { // non-block mode + } else { + // non-block mode if (lnum > top->lnum && lnum <= bot->lnum) { fromcol = 0; } else if (lnum == top->lnum) { |