Patch 8.1.0722
Problem: Cannot build without the virtualedit feature.
Solution: Make getviscol2() always available.
Files: src/misc2.c, src/proto/misc2.pro, src/ops.c
*** ../vim-8.1.0721/src/misc2.c 2018-12-28 21:59:24.512992993 +0100
--- src/misc2.c 2019-01-11 16:07:09.994655012 +0100
***************
*** 48,69 ****
}
/*
- * Get the screen position of character col with a coladd in the cursor line.
- */
- int
- getviscol2(colnr_T col, colnr_T coladd)
- {
- colnr_T x;
- pos_T pos;
-
- pos.lnum = curwin->w_cursor.lnum;
- pos.col = col;
- pos.coladd = coladd;
- getvvcol(curwin, &pos, &x, NULL, NULL);
- return (int)x;
- }
-
- /*
* Go to column "wcol", and add/insert white space as necessary to get the
* cursor in that column.
* The caller must have saved the cursor line for undo!
--- 48,53 ----
***************
*** 86,91 ****
--- 70,93 ----
#endif
/*
+ * Get the screen position of character col with a coladd in the cursor line.
+ */
+ int
+ getviscol2(colnr_T col, colnr_T coladd)
+ {
+ colnr_T x;
+ pos_T pos;
+
+ pos.lnum = curwin->w_cursor.lnum;
+ pos.col = col;
+ #ifdef FEAT_VIRTUALEDIT
+ pos.coladd = coladd;
+ #endif
+ getvvcol(curwin, &pos, &x, NULL, NULL);
+ return (int)x;
+ }
+
+ /*
* Try to advance the Cursor to the specified screen column.
* If virtual editing: fine tune the cursor position.
* Note that all virtual positions off the end of a line should share
*** ../vim-8.1.0721/src/proto/misc2.pro 2018-12-28 21:59:24.512992993 +0100
--- src/proto/misc2.pro 2019-01-11 16:08:07.810288364 +0100
***************
*** 1,8 ****
/* misc2.c */
int virtual_active(void);
int getviscol(void);
- int getviscol2(colnr_T col, colnr_T coladd);
int coladvance_force(colnr_T wcol);
int coladvance(colnr_T wcol);
int getvpos(pos_T *pos, colnr_T wcol);
int inc_cursor(void);
--- 1,8 ----
/* misc2.c */
int virtual_active(void);
int getviscol(void);
int coladvance_force(colnr_T wcol);
+ int getviscol2(colnr_T col, colnr_T coladd);
int coladvance(colnr_T wcol);
int getvpos(pos_T *pos, colnr_T wcol);
int inc_cursor(void);
*** ../vim-8.1.0721/src/ops.c 2019-01-11 14:37:16.689248837 +0100
--- src/ops.c 2019-01-11 16:09:04.201926229 +0100
***************
*** 2754,2760 ****
)
{
int t = getviscol2(curbuf->b_op_start_orig.col,
! curbuf->b_op_start_orig.coladd);
oap->start.col = curbuf->b_op_start_orig.col;
pre_textlen -= t - oap->start_vcol;
oap->start_vcol = t;
--- 2754,2765 ----
)
{
int t = getviscol2(curbuf->b_op_start_orig.col,
! #ifdef FEAT_VIRTUALEDIT
! curbuf->b_op_start_orig.coladd
! #else
! 0
! #endif
! );
oap->start.col = curbuf->b_op_start_orig.col;
pre_textlen -= t - oap->start_vcol;
oap->start_vcol = t;
***************
*** 2771,2777 ****
)
{
int t = getviscol2(curbuf->b_op_start_orig.col,
! curbuf->b_op_start_orig.coladd);
oap->start.col = curbuf->b_op_start_orig.col;
/* reset pre_textlen to the value of OP_INSERT */
pre_textlen += bd.textlen;
--- 2776,2787 ----
)
{
int t = getviscol2(curbuf->b_op_start_orig.col,
! #ifdef FEAT_VIRTUALEDIT
! curbuf->b_op_start_orig.coladd
! #else
! 0
! #endif
! );
oap->start.col = curbuf->b_op_start_orig.col;
/* reset pre_textlen to the value of OP_INSERT */
pre_textlen += bd.textlen;
*** ../vim-8.1.0721/src/version.c 2019-01-11 15:54:12.940038982 +0100
--- src/version.c 2019-01-11 16:08:04.106312000 +0100
***************
*** 797,798 ****
--- 797,800 ----
{ /* Add new patch number below this line */
+ /**/
+ 722,
/**/
--
hundred-and-one symptoms of being an internet addict:
161. You get up before the sun rises to check your e-mail, and you
find yourself in the very same chair long after the sun has set.
/// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.