|
Karsten Hopp |
4a1851 |
To: vim_dev@googlegroups.com
|
|
Karsten Hopp |
4a1851 |
Subject: Patch 7.4.576
|
|
Karsten Hopp |
4a1851 |
Fcc: outbox
|
|
Karsten Hopp |
4a1851 |
From: Bram Moolenaar <Bram@moolenaar.net>
|
|
Karsten Hopp |
4a1851 |
Mime-Version: 1.0
|
|
Karsten Hopp |
4a1851 |
Content-Type: text/plain; charset=UTF-8
|
|
Karsten Hopp |
4a1851 |
Content-Transfer-Encoding: 8bit
|
|
Karsten Hopp |
4a1851 |
------------
|
|
Karsten Hopp |
4a1851 |
|
|
Karsten Hopp |
4a1851 |
Patch 7.4.576
|
|
Karsten Hopp |
4a1851 |
Problem: Redrawing problem with 'relativenumber' and 'linebreak'.
|
|
Karsten Hopp |
4a1851 |
Solution: Temporarily reset 'linebreak' and restore it in more places.
|
|
Karsten Hopp |
4a1851 |
(Christian Brabandt)
|
|
Karsten Hopp |
4a1851 |
Files: src/normal.c
|
|
Karsten Hopp |
4a1851 |
|
|
Karsten Hopp |
4a1851 |
|
|
Karsten Hopp |
4a1851 |
*** ../vim-7.4.575/src/normal.c 2014-10-31 13:54:21.843214469 +0100
|
|
Karsten Hopp |
4a1851 |
--- src/normal.c 2015-01-14 17:49:38.320915425 +0100
|
|
Karsten Hopp |
4a1851 |
***************
|
|
Karsten Hopp |
4a1851 |
*** 1393,1402 ****
|
|
Karsten Hopp |
4a1851 |
int include_line_break = FALSE;
|
|
Karsten Hopp |
4a1851 |
#endif
|
|
Karsten Hopp |
4a1851 |
|
|
Karsten Hopp |
4a1851 |
- #ifdef FEAT_LINEBREAK
|
|
Karsten Hopp |
4a1851 |
- curwin->w_p_lbr = FALSE; /* Avoid a problem with unwanted linebreaks in
|
|
Karsten Hopp |
4a1851 |
- * block mode. */
|
|
Karsten Hopp |
4a1851 |
- #endif
|
|
Karsten Hopp |
4a1851 |
#if defined(FEAT_CLIPBOARD)
|
|
Karsten Hopp |
4a1851 |
/*
|
|
Karsten Hopp |
4a1851 |
* Yank the visual area into the GUI selection register before we operate
|
|
Karsten Hopp |
4a1851 |
--- 1393,1398 ----
|
|
Karsten Hopp |
4a1851 |
***************
|
|
Karsten Hopp |
4a1851 |
*** 1420,1425 ****
|
|
Karsten Hopp |
4a1851 |
--- 1416,1425 ----
|
|
Karsten Hopp |
4a1851 |
*/
|
|
Karsten Hopp |
4a1851 |
if ((finish_op || VIsual_active) && oap->op_type != OP_NOP)
|
|
Karsten Hopp |
4a1851 |
{
|
|
Karsten Hopp |
4a1851 |
+ #ifdef FEAT_LINEBREAK
|
|
Karsten Hopp |
4a1851 |
+ /* Avoid a problem with unwanted linebreaks in block mode. */
|
|
Karsten Hopp |
4a1851 |
+ curwin->w_p_lbr = FALSE;
|
|
Karsten Hopp |
4a1851 |
+ #endif
|
|
Karsten Hopp |
4a1851 |
oap->is_VIsual = VIsual_active;
|
|
Karsten Hopp |
4a1851 |
if (oap->motion_force == 'V')
|
|
Karsten Hopp |
4a1851 |
oap->motion_type = MLINE;
|
|
Karsten Hopp |
4a1851 |
***************
|
|
Karsten Hopp |
4a1851 |
*** 1819,1825 ****
|
|
Karsten Hopp |
4a1851 |
--- 1819,1831 ----
|
|
Karsten Hopp |
4a1851 |
|| oap->op_type == OP_FUNCTION
|
|
Karsten Hopp |
4a1851 |
|| oap->op_type == OP_FILTER)
|
|
Karsten Hopp |
4a1851 |
&& oap->motion_force == NUL)
|
|
Karsten Hopp |
4a1851 |
+ {
|
|
Karsten Hopp |
4a1851 |
+ #ifdef FEAT_LINEBREAK
|
|
Karsten Hopp |
4a1851 |
+ /* make sure redrawing is correct */
|
|
Karsten Hopp |
4a1851 |
+ curwin->w_p_lbr = lbr_saved;
|
|
Karsten Hopp |
4a1851 |
+ #endif
|
|
Karsten Hopp |
4a1851 |
redraw_curbuf_later(INVERTED);
|
|
Karsten Hopp |
4a1851 |
+ }
|
|
Karsten Hopp |
4a1851 |
}
|
|
Karsten Hopp |
4a1851 |
}
|
|
Karsten Hopp |
4a1851 |
|
|
Karsten Hopp |
4a1851 |
***************
|
|
Karsten Hopp |
4a1851 |
*** 1863,1869 ****
|
|
Karsten Hopp |
4a1851 |
--- 1869,1880 ----
|
|
Karsten Hopp |
4a1851 |
|| oap->op_type == OP_FOLD
|
|
Karsten Hopp |
4a1851 |
#endif
|
|
Karsten Hopp |
4a1851 |
))
|
|
Karsten Hopp |
4a1851 |
+ {
|
|
Karsten Hopp |
4a1851 |
+ #ifdef FEAT_LINEBREAK
|
|
Karsten Hopp |
4a1851 |
+ curwin->w_p_lbr = lbr_saved;
|
|
Karsten Hopp |
4a1851 |
+ #endif
|
|
Karsten Hopp |
4a1851 |
redraw_curbuf_later(INVERTED);
|
|
Karsten Hopp |
4a1851 |
+ }
|
|
Karsten Hopp |
4a1851 |
|
|
Karsten Hopp |
4a1851 |
/*
|
|
Karsten Hopp |
4a1851 |
* If the end of an operator is in column one while oap->motion_type
|
|
Karsten Hopp |
4a1851 |
***************
|
|
Karsten Hopp |
4a1851 |
*** 1947,1953 ****
|
|
Karsten Hopp |
4a1851 |
--- 1958,1969 ----
|
|
Karsten Hopp |
4a1851 |
}
|
|
Karsten Hopp |
4a1851 |
}
|
|
Karsten Hopp |
4a1851 |
else
|
|
Karsten Hopp |
4a1851 |
+ {
|
|
Karsten Hopp |
4a1851 |
+ #ifdef FEAT_LINEBREAK
|
|
Karsten Hopp |
4a1851 |
+ curwin->w_p_lbr = lbr_saved;
|
|
Karsten Hopp |
4a1851 |
+ #endif
|
|
Karsten Hopp |
4a1851 |
(void)op_yank(oap, FALSE, !gui_yank);
|
|
Karsten Hopp |
4a1851 |
+ }
|
|
Karsten Hopp |
4a1851 |
check_cursor_col();
|
|
Karsten Hopp |
4a1851 |
break;
|
|
Karsten Hopp |
4a1851 |
|
|
Karsten Hopp |
4a1851 |
***************
|
|
Karsten Hopp |
4a1851 |
*** 1969,1974 ****
|
|
Karsten Hopp |
4a1851 |
--- 1985,1995 ----
|
|
Karsten Hopp |
4a1851 |
else
|
|
Karsten Hopp |
4a1851 |
restart_edit_save = 0;
|
|
Karsten Hopp |
4a1851 |
restart_edit = 0;
|
|
Karsten Hopp |
4a1851 |
+ #ifdef FEAT_LINEBREAK
|
|
Karsten Hopp |
4a1851 |
+ /* Restore linebreak, so that when the user edits it looks as
|
|
Karsten Hopp |
4a1851 |
+ * before. */
|
|
Karsten Hopp |
4a1851 |
+ curwin->w_p_lbr = lbr_saved;
|
|
Karsten Hopp |
4a1851 |
+ #endif
|
|
Karsten Hopp |
4a1851 |
/* Reset finish_op now, don't want it set inside edit(). */
|
|
Karsten Hopp |
4a1851 |
finish_op = FALSE;
|
|
Karsten Hopp |
4a1851 |
if (op_change(oap)) /* will call edit() */
|
|
Karsten Hopp |
4a1851 |
***************
|
|
Karsten Hopp |
4a1851 |
*** 2064,2071 ****
|
|
Karsten Hopp |
4a1851 |
* Visual mode. But do this only once. */
|
|
Karsten Hopp |
4a1851 |
restart_edit_save = restart_edit;
|
|
Karsten Hopp |
4a1851 |
restart_edit = 0;
|
|
Karsten Hopp |
4a1851 |
!
|
|
Karsten Hopp |
4a1851 |
op_insert(oap, cap->count1);
|
|
Karsten Hopp |
4a1851 |
|
|
Karsten Hopp |
4a1851 |
/* TODO: when inserting in several lines, should format all
|
|
Karsten Hopp |
4a1851 |
* the lines. */
|
|
Karsten Hopp |
4a1851 |
--- 2085,2100 ----
|
|
Karsten Hopp |
4a1851 |
* Visual mode. But do this only once. */
|
|
Karsten Hopp |
4a1851 |
restart_edit_save = restart_edit;
|
|
Karsten Hopp |
4a1851 |
restart_edit = 0;
|
|
Karsten Hopp |
4a1851 |
! #ifdef FEAT_LINEBREAK
|
|
Karsten Hopp |
4a1851 |
! /* Restore linebreak, so that when the user edits it looks as
|
|
Karsten Hopp |
4a1851 |
! * before. */
|
|
Karsten Hopp |
4a1851 |
! curwin->w_p_lbr = lbr_saved;
|
|
Karsten Hopp |
4a1851 |
! #endif
|
|
Karsten Hopp |
4a1851 |
op_insert(oap, cap->count1);
|
|
Karsten Hopp |
4a1851 |
+ #ifdef FEAT_LINEBREAK
|
|
Karsten Hopp |
4a1851 |
+ /* Reset linebreak, so that formatting works correctly. */
|
|
Karsten Hopp |
4a1851 |
+ curwin->w_p_lbr = FALSE;
|
|
Karsten Hopp |
4a1851 |
+ #endif
|
|
Karsten Hopp |
4a1851 |
|
|
Karsten Hopp |
4a1851 |
/* TODO: when inserting in several lines, should format all
|
|
Karsten Hopp |
4a1851 |
* the lines. */
|
|
Karsten Hopp |
4a1851 |
***************
|
|
Karsten Hopp |
4a1851 |
*** 2090,2096 ****
|
|
Karsten Hopp |
4a1851 |
--- 2119,2132 ----
|
|
Karsten Hopp |
4a1851 |
}
|
|
Karsten Hopp |
4a1851 |
#ifdef FEAT_VISUALEXTRA
|
|
Karsten Hopp |
4a1851 |
else
|
|
Karsten Hopp |
4a1851 |
+ {
|
|
Karsten Hopp |
4a1851 |
+ #ifdef FEAT_LINEBREAK
|
|
Karsten Hopp |
4a1851 |
+ /* Restore linebreak, so that when the user edits it looks as
|
|
Karsten Hopp |
4a1851 |
+ * before. */
|
|
Karsten Hopp |
4a1851 |
+ curwin->w_p_lbr = lbr_saved;
|
|
Karsten Hopp |
4a1851 |
+ #endif
|
|
Karsten Hopp |
4a1851 |
op_replace(oap, cap->nchar);
|
|
Karsten Hopp |
4a1851 |
+ }
|
|
Karsten Hopp |
4a1851 |
#endif
|
|
Karsten Hopp |
4a1851 |
break;
|
|
Karsten Hopp |
4a1851 |
|
|
Karsten Hopp |
4a1851 |
***************
|
|
Karsten Hopp |
4a1851 |
*** 2134,2140 ****
|
|
Karsten Hopp |
4a1851 |
--- 2170,2181 ----
|
|
Karsten Hopp |
4a1851 |
if (!p_sol && oap->motion_type == MLINE && !oap->end_adjusted
|
|
Karsten Hopp |
4a1851 |
&& (oap->op_type == OP_LSHIFT || oap->op_type == OP_RSHIFT
|
|
Karsten Hopp |
4a1851 |
|| oap->op_type == OP_DELETE))
|
|
Karsten Hopp |
4a1851 |
+ {
|
|
Karsten Hopp |
4a1851 |
+ #ifdef FEAT_LINEBREAK
|
|
Karsten Hopp |
4a1851 |
+ curwin->w_p_lbr = FALSE;
|
|
Karsten Hopp |
4a1851 |
+ #endif
|
|
Karsten Hopp |
4a1851 |
coladvance(curwin->w_curswant = old_col);
|
|
Karsten Hopp |
4a1851 |
+ }
|
|
Karsten Hopp |
4a1851 |
}
|
|
Karsten Hopp |
4a1851 |
else
|
|
Karsten Hopp |
4a1851 |
{
|
|
Karsten Hopp |
4a1851 |
*** ../vim-7.4.575/src/version.c 2015-01-14 17:40:04.407125696 +0100
|
|
Karsten Hopp |
4a1851 |
--- src/version.c 2015-01-14 17:47:45.898132017 +0100
|
|
Karsten Hopp |
4a1851 |
***************
|
|
Karsten Hopp |
4a1851 |
*** 743,744 ****
|
|
Karsten Hopp |
4a1851 |
--- 743,746 ----
|
|
Karsten Hopp |
4a1851 |
{ /* Add new patch number below this line */
|
|
Karsten Hopp |
4a1851 |
+ /**/
|
|
Karsten Hopp |
4a1851 |
+ 576,
|
|
Karsten Hopp |
4a1851 |
/**/
|
|
Karsten Hopp |
4a1851 |
|
|
Karsten Hopp |
4a1851 |
--
|
|
Karsten Hopp |
4a1851 |
From "know your smileys":
|
|
Karsten Hopp |
4a1851 |
:-H Is missing teeth
|
|
Karsten Hopp |
4a1851 |
|
|
Karsten Hopp |
4a1851 |
/// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
|
|
Karsten Hopp |
4a1851 |
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
|
|
Karsten Hopp |
4a1851 |
\\\ an exciting new programming language -- http://www.Zimbu.org ///
|
|
Karsten Hopp |
4a1851 |
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
|