aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/normal.c
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2014-11-27 20:58:39 -0500
committerJustin M. Keyes <justinkz@gmail.com>2014-11-27 20:58:39 -0500
commit49b65b0fcd360f483d93d3b1ed70610bcffd95c4 (patch)
tree95bf8900c29f7ee3361d1a0454da4e75a0aaeca7 /src/nvim/normal.c
parente5a386d2f819ee3a357384279d1a7810ec213087 (diff)
parent9ab44e74abb7553ad39c13621e0904680e61287d (diff)
downloadrneovim-49b65b0fcd360f483d93d3b1ed70610bcffd95c4.tar.gz
rneovim-49b65b0fcd360f483d93d3b1ed70610bcffd95c4.tar.bz2
rneovim-49b65b0fcd360f483d93d3b1ed70610bcffd95c4.zip
Merge pull request #1516 from fmoralesc/new-patches
vim-patch:7.4.425,435,467,472,473,478
Diffstat (limited to 'src/nvim/normal.c')
-rw-r--r--src/nvim/normal.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/nvim/normal.c b/src/nvim/normal.c
index 843556bb49..0a43d59607 100644
--- a/src/nvim/normal.c
+++ b/src/nvim/normal.c
@@ -1091,6 +1091,10 @@ void do_pending_operator(cmdarg_T *cap, int old_col, bool gui_yank)
pos_T old_cursor;
bool empty_region_error;
int restart_edit_save;
+ int lbr_saved = curwin->w_p_lbr;
+
+ curwin->w_p_lbr = false; /* avoid a problem with unwanted linebreaks in
+ * block mode */
/* The visual area is remembered for redo */
static int redo_VIsual_mode = NUL; /* 'v', 'V', or Ctrl-V */
@@ -1703,6 +1707,7 @@ void do_pending_operator(cmdarg_T *cap, int old_col, bool gui_yank)
oap->block_mode = false;
clearop(oap);
}
+ curwin->w_p_lbr = lbr_saved;
}
/*
@@ -3484,7 +3489,11 @@ static bool nv_screengo(oparg_T *oap, int dir, long dist)
* screenline or move two screenlines.
*/
validate_virtcol();
- if (curwin->w_virtcol > curwin->w_curswant
+ colnr_T virtcol = curwin->w_virtcol;
+ if (virtcol > (colnr_T)width1 && *p_sbr != NUL)
+ virtcol -= vim_strsize(p_sbr);
+
+ if (virtcol > curwin->w_curswant
&& (curwin->w_curswant < (colnr_T)width1
? (curwin->w_curswant > (colnr_T)width1 / 2)
: ((curwin->w_curswant - width1) % width2