|
Karsten Hopp |
39439f |
To: vim_dev@googlegroups.com
|
|
Karsten Hopp |
39439f |
Subject: Patch 7.4.353
|
|
Karsten Hopp |
39439f |
Fcc: outbox
|
|
Karsten Hopp |
39439f |
From: Bram Moolenaar <Bram@moolenaar.net>
|
|
Karsten Hopp |
39439f |
Mime-Version: 1.0
|
|
Karsten Hopp |
39439f |
Content-Type: text/plain; charset=UTF-8
|
|
Karsten Hopp |
39439f |
Content-Transfer-Encoding: 8bit
|
|
Karsten Hopp |
39439f |
------------
|
|
Karsten Hopp |
39439f |
|
|
Karsten Hopp |
39439f |
Patch 7.4.353
|
|
Karsten Hopp |
39439f |
Problem: 'linebreak' doesn't work with the 'list' option.
|
|
Karsten Hopp |
39439f |
Solution: Make it work. (Christian Brabandt)
|
|
Karsten Hopp |
a1c8e6 |
Files: src/charset.c, src/screen.c,
|
|
Karsten Hopp |
39439f |
src/testdir/Make_amiga.mak, src/testdir/Make_dos.mak,
|
|
Karsten Hopp |
39439f |
src/testdir/Make_ming.mak, src/testdir/Make_os2.mak,
|
|
Karsten Hopp |
39439f |
src/testdir/Make_vms.mms, src/testdir/Makefile,
|
|
Karsten Hopp |
39439f |
src/testdir/test_listlbr.in, src/testdir/test_listlbr.ok
|
|
Karsten Hopp |
39439f |
|
|
Karsten Hopp |
39439f |
|
|
Karsten Hopp |
39439f |
*** ../vim-7.4.352/src/charset.c 2014-07-02 19:37:38.462354956 +0200
|
|
Karsten Hopp |
39439f |
--- src/charset.c 2014-07-02 19:47:21.602363892 +0200
|
|
Karsten Hopp |
39439f |
***************
|
|
Karsten Hopp |
39439f |
*** 1120,1126 ****
|
|
Karsten Hopp |
39439f |
if (wp->w_p_lbr
|
|
Karsten Hopp |
39439f |
&& vim_isbreak(c)
|
|
Karsten Hopp |
39439f |
&& !vim_isbreak(s[1])
|
|
Karsten Hopp |
39439f |
- && !wp->w_p_list
|
|
Karsten Hopp |
39439f |
&& wp->w_p_wrap
|
|
Karsten Hopp |
39439f |
# ifdef FEAT_VERTSPLIT
|
|
Karsten Hopp |
39439f |
&& wp->w_width != 0
|
|
Karsten Hopp |
39439f |
--- 1120,1125 ----
|
|
Karsten Hopp |
39439f |
*** ../vim-7.4.352/src/screen.c 2014-07-02 17:16:51.330225522 +0200
|
|
Karsten Hopp |
39439f |
--- src/screen.c 2014-07-02 19:51:42.082367883 +0200
|
|
Karsten Hopp |
39439f |
***************
|
|
Karsten Hopp |
39439f |
*** 2843,2848 ****
|
|
Karsten Hopp |
39439f |
--- 2843,2849 ----
|
|
Karsten Hopp |
39439f |
char_u extra[18]; /* "%ld" and 'fdc' must fit in here */
|
|
Karsten Hopp |
39439f |
int n_extra = 0; /* number of extra chars */
|
|
Karsten Hopp |
39439f |
char_u *p_extra = NULL; /* string of extra chars, plus NUL */
|
|
Karsten Hopp |
39439f |
+ char_u *p_extra_free = NULL; /* p_extra needs to be freed */
|
|
Karsten Hopp |
39439f |
int c_extra = NUL; /* extra chars, all the same */
|
|
Karsten Hopp |
39439f |
int extra_attr = 0; /* attributes when n_extra != 0 */
|
|
Karsten Hopp |
39439f |
static char_u *at_end_str = (char_u *)""; /* used for p_extra when
|
|
Karsten Hopp |
39439f |
***************
|
|
Karsten Hopp |
39439f |
*** 4053,4058 ****
|
|
Karsten Hopp |
39439f |
--- 4054,4064 ----
|
|
Karsten Hopp |
39439f |
}
|
|
Karsten Hopp |
39439f |
else
|
|
Karsten Hopp |
39439f |
{
|
|
Karsten Hopp |
39439f |
+ if (p_extra_free != NULL)
|
|
Karsten Hopp |
39439f |
+ {
|
|
Karsten Hopp |
39439f |
+ vim_free(p_extra_free);
|
|
Karsten Hopp |
39439f |
+ p_extra_free = NULL;
|
|
Karsten Hopp |
39439f |
+ }
|
|
Karsten Hopp |
39439f |
/*
|
|
Karsten Hopp |
39439f |
* Get a character from the line itself.
|
|
Karsten Hopp |
39439f |
*/
|
|
Karsten Hopp |
39439f |
***************
|
|
Karsten Hopp |
39439f |
*** 4424,4431 ****
|
|
Karsten Hopp |
39439f |
/*
|
|
Karsten Hopp |
39439f |
* Found last space before word: check for line break.
|
|
Karsten Hopp |
39439f |
*/
|
|
Karsten Hopp |
39439f |
! if (wp->w_p_lbr && vim_isbreak(c) && !vim_isbreak(*ptr)
|
|
Karsten Hopp |
39439f |
! && !wp->w_p_list)
|
|
Karsten Hopp |
39439f |
{
|
|
Karsten Hopp |
39439f |
char_u *p = ptr - (
|
|
Karsten Hopp |
39439f |
# ifdef FEAT_MBYTE
|
|
Karsten Hopp |
39439f |
--- 4430,4436 ----
|
|
Karsten Hopp |
39439f |
/*
|
|
Karsten Hopp |
39439f |
* Found last space before word: check for line break.
|
|
Karsten Hopp |
39439f |
*/
|
|
Karsten Hopp |
39439f |
! if (wp->w_p_lbr && vim_isbreak(c) && !vim_isbreak(*ptr))
|
|
Karsten Hopp |
39439f |
{
|
|
Karsten Hopp |
39439f |
char_u *p = ptr - (
|
|
Karsten Hopp |
39439f |
# ifdef FEAT_MBYTE
|
|
Karsten Hopp |
39439f |
***************
|
|
Karsten Hopp |
39439f |
*** 4433,4439 ****
|
|
Karsten Hopp |
39439f |
# endif
|
|
Karsten Hopp |
39439f |
1);
|
|
Karsten Hopp |
39439f |
/* TODO: is passing p for start of the line OK? */
|
|
Karsten Hopp |
39439f |
! n_extra = win_lbr_chartabsize(wp, p, p, (colnr_T)vcol,
|
|
Karsten Hopp |
39439f |
NULL) - 1;
|
|
Karsten Hopp |
39439f |
c_extra = ' ';
|
|
Karsten Hopp |
39439f |
if (vim_iswhite(c))
|
|
Karsten Hopp |
39439f |
--- 4438,4444 ----
|
|
Karsten Hopp |
39439f |
# endif
|
|
Karsten Hopp |
39439f |
1);
|
|
Karsten Hopp |
39439f |
/* TODO: is passing p for start of the line OK? */
|
|
Karsten Hopp |
39439f |
! n_extra = win_lbr_chartabsize(wp, line, p, (colnr_T)vcol,
|
|
Karsten Hopp |
39439f |
NULL) - 1;
|
|
Karsten Hopp |
39439f |
c_extra = ' ';
|
|
Karsten Hopp |
39439f |
if (vim_iswhite(c))
|
|
Karsten Hopp |
39439f |
***************
|
|
Karsten Hopp |
39439f |
*** 4443,4449 ****
|
|
Karsten Hopp |
39439f |
/* See "Tab alignment" below. */
|
|
Karsten Hopp |
39439f |
FIX_FOR_BOGUSCOLS;
|
|
Karsten Hopp |
39439f |
#endif
|
|
Karsten Hopp |
39439f |
! c = ' ';
|
|
Karsten Hopp |
39439f |
}
|
|
Karsten Hopp |
39439f |
}
|
|
Karsten Hopp |
39439f |
#endif
|
|
Karsten Hopp |
39439f |
--- 4448,4455 ----
|
|
Karsten Hopp |
39439f |
/* See "Tab alignment" below. */
|
|
Karsten Hopp |
39439f |
FIX_FOR_BOGUSCOLS;
|
|
Karsten Hopp |
39439f |
#endif
|
|
Karsten Hopp |
39439f |
! if (!wp->w_p_list)
|
|
Karsten Hopp |
39439f |
! c = ' ';
|
|
Karsten Hopp |
39439f |
}
|
|
Karsten Hopp |
39439f |
}
|
|
Karsten Hopp |
39439f |
#endif
|
|
Karsten Hopp |
39439f |
***************
|
|
Karsten Hopp |
39439f |
*** 4483,4491 ****
|
|
Karsten Hopp |
39439f |
*/
|
|
Karsten Hopp |
39439f |
if (c == TAB && (!wp->w_p_list || lcs_tab1))
|
|
Karsten Hopp |
39439f |
{
|
|
Karsten Hopp |
39439f |
/* tab amount depends on current column */
|
|
Karsten Hopp |
39439f |
! n_extra = (int)wp->w_buffer->b_p_ts
|
|
Karsten Hopp |
39439f |
- vcol % (int)wp->w_buffer->b_p_ts - 1;
|
|
Karsten Hopp |
39439f |
#ifdef FEAT_CONCEAL
|
|
Karsten Hopp |
39439f |
/* Tab alignment should be identical regardless of
|
|
Karsten Hopp |
39439f |
* 'conceallevel' value. So tab compensates of all
|
|
Karsten Hopp |
39439f |
--- 4489,4538 ----
|
|
Karsten Hopp |
39439f |
*/
|
|
Karsten Hopp |
39439f |
if (c == TAB && (!wp->w_p_list || lcs_tab1))
|
|
Karsten Hopp |
39439f |
{
|
|
Karsten Hopp |
39439f |
+ int tab_len = 0;
|
|
Karsten Hopp |
39439f |
/* tab amount depends on current column */
|
|
Karsten Hopp |
39439f |
! tab_len = (int)wp->w_buffer->b_p_ts
|
|
Karsten Hopp |
39439f |
- vcol % (int)wp->w_buffer->b_p_ts - 1;
|
|
Karsten Hopp |
39439f |
+ #ifdef FEAT_LINEBREAK
|
|
Karsten Hopp |
39439f |
+ if (!wp->w_p_lbr)
|
|
Karsten Hopp |
39439f |
+ #endif
|
|
Karsten Hopp |
39439f |
+ /* tab amount depends on current column */
|
|
Karsten Hopp |
39439f |
+ n_extra = tab_len;
|
|
Karsten Hopp |
39439f |
+ #ifdef FEAT_LINEBREAK
|
|
Karsten Hopp |
39439f |
+ else
|
|
Karsten Hopp |
39439f |
+ {
|
|
Karsten Hopp |
39439f |
+ char_u *p;
|
|
Karsten Hopp |
39439f |
+ int len = n_extra;
|
|
Karsten Hopp |
39439f |
+ int i;
|
|
Karsten Hopp |
39439f |
+ int saved_nextra = n_extra;
|
|
Karsten Hopp |
39439f |
+
|
|
Karsten Hopp |
39439f |
+ /* if n_extra > 0, it gives the number of chars, to
|
|
Karsten Hopp |
39439f |
+ * use for a tab, else we need to calculate the width
|
|
Karsten Hopp |
39439f |
+ * for a tab */
|
|
Karsten Hopp |
39439f |
+ #ifdef FEAT_MBYTE
|
|
Karsten Hopp |
39439f |
+ len = (tab_len * mb_char2len(lcs_tab2));
|
|
Karsten Hopp |
39439f |
+ if (n_extra > 0)
|
|
Karsten Hopp |
39439f |
+ len += n_extra - tab_len;
|
|
Karsten Hopp |
39439f |
+ #endif
|
|
Karsten Hopp |
39439f |
+ c = lcs_tab1;
|
|
Karsten Hopp |
39439f |
+ p = alloc((unsigned)(len + 1));
|
|
Karsten Hopp |
39439f |
+ vim_memset(p, ' ', len);
|
|
Karsten Hopp |
39439f |
+ p[len] = NUL;
|
|
Karsten Hopp |
39439f |
+ p_extra_free = p;
|
|
Karsten Hopp |
39439f |
+ for (i = 0; i < tab_len; i++)
|
|
Karsten Hopp |
39439f |
+ {
|
|
Karsten Hopp |
39439f |
+ #ifdef FEAT_MBYTE
|
|
Karsten Hopp |
39439f |
+ mb_char2bytes(lcs_tab2, p);
|
|
Karsten Hopp |
39439f |
+ p += mb_char2len(lcs_tab2);
|
|
Karsten Hopp |
39439f |
+ n_extra += mb_char2len(lcs_tab2)
|
|
Karsten Hopp |
39439f |
+ - (saved_nextra > 0 ? 1 : 0);
|
|
Karsten Hopp |
39439f |
+ #else
|
|
Karsten Hopp |
39439f |
+ p[i] = lcs_tab2;
|
|
Karsten Hopp |
39439f |
+ #endif
|
|
Karsten Hopp |
39439f |
+ }
|
|
Karsten Hopp |
39439f |
+ p_extra = p_extra_free;
|
|
Karsten Hopp |
39439f |
+ }
|
|
Karsten Hopp |
39439f |
+ #endif
|
|
Karsten Hopp |
39439f |
#ifdef FEAT_CONCEAL
|
|
Karsten Hopp |
39439f |
/* Tab alignment should be identical regardless of
|
|
Karsten Hopp |
39439f |
* 'conceallevel' value. So tab compensates of all
|
|
Karsten Hopp |
39439f |
***************
|
|
Karsten Hopp |
39439f |
*** 4501,4508 ****
|
|
Karsten Hopp |
39439f |
if (wp->w_p_list)
|
|
Karsten Hopp |
39439f |
{
|
|
Karsten Hopp |
39439f |
c = lcs_tab1;
|
|
Karsten Hopp |
39439f |
! c_extra = lcs_tab2;
|
|
Karsten Hopp |
39439f |
! n_attr = n_extra + 1;
|
|
Karsten Hopp |
39439f |
extra_attr = hl_attr(HLF_8);
|
|
Karsten Hopp |
39439f |
saved_attr2 = char_attr; /* save current attr */
|
|
Karsten Hopp |
39439f |
#ifdef FEAT_MBYTE
|
|
Karsten Hopp |
39439f |
--- 4548,4560 ----
|
|
Karsten Hopp |
39439f |
if (wp->w_p_list)
|
|
Karsten Hopp |
39439f |
{
|
|
Karsten Hopp |
39439f |
c = lcs_tab1;
|
|
Karsten Hopp |
39439f |
! #ifdef FEAT_LINEBREAK
|
|
Karsten Hopp |
39439f |
! if (wp->w_p_lbr)
|
|
Karsten Hopp |
39439f |
! c_extra = NUL; /* using p_extra from above */
|
|
Karsten Hopp |
39439f |
! else
|
|
Karsten Hopp |
39439f |
! #endif
|
|
Karsten Hopp |
39439f |
! c_extra = lcs_tab2;
|
|
Karsten Hopp |
39439f |
! n_attr = tab_len + 1;
|
|
Karsten Hopp |
39439f |
extra_attr = hl_attr(HLF_8);
|
|
Karsten Hopp |
39439f |
saved_attr2 = char_attr; /* save current attr */
|
|
Karsten Hopp |
39439f |
#ifdef FEAT_MBYTE
|
|
Karsten Hopp |
39439f |
***************
|
|
Karsten Hopp |
39439f |
*** 4598,4606 ****
|
|
Karsten Hopp |
39439f |
if ((dy_flags & DY_UHEX) && wp->w_p_rl)
|
|
Karsten Hopp |
39439f |
rl_mirror(p_extra); /* reverse "<12>" */
|
|
Karsten Hopp |
39439f |
#endif
|
|
Karsten Hopp |
39439f |
- n_extra = byte2cells(c) - 1;
|
|
Karsten Hopp |
39439f |
c_extra = NUL;
|
|
Karsten Hopp |
39439f |
! c = *p_extra++;
|
|
Karsten Hopp |
39439f |
if (!attr_pri)
|
|
Karsten Hopp |
39439f |
{
|
|
Karsten Hopp |
39439f |
n_attr = n_extra + 1;
|
|
Karsten Hopp |
39439f |
--- 4650,4674 ----
|
|
Karsten Hopp |
39439f |
if ((dy_flags & DY_UHEX) && wp->w_p_rl)
|
|
Karsten Hopp |
39439f |
rl_mirror(p_extra); /* reverse "<12>" */
|
|
Karsten Hopp |
39439f |
#endif
|
|
Karsten Hopp |
39439f |
c_extra = NUL;
|
|
Karsten Hopp |
39439f |
! #ifdef FEAT_LINEBREAK
|
|
Karsten Hopp |
39439f |
! if (wp->w_p_lbr)
|
|
Karsten Hopp |
39439f |
! {
|
|
Karsten Hopp |
39439f |
! char_u *p;
|
|
Karsten Hopp |
39439f |
!
|
|
Karsten Hopp |
39439f |
! c = *p_extra;
|
|
Karsten Hopp |
39439f |
! p = alloc((unsigned)n_extra + 1);
|
|
Karsten Hopp |
39439f |
! vim_memset(p, ' ', n_extra);
|
|
Karsten Hopp |
39439f |
! STRNCPY(p, p_extra + 1, STRLEN(p_extra) - 1);
|
|
Karsten Hopp |
39439f |
! p[n_extra] = NUL;
|
|
Karsten Hopp |
39439f |
! p_extra_free = p_extra = p;
|
|
Karsten Hopp |
39439f |
! }
|
|
Karsten Hopp |
39439f |
! else
|
|
Karsten Hopp |
39439f |
! #endif
|
|
Karsten Hopp |
39439f |
! {
|
|
Karsten Hopp |
39439f |
! n_extra = byte2cells(c) - 1;
|
|
Karsten Hopp |
39439f |
! c = *p_extra++;
|
|
Karsten Hopp |
39439f |
! }
|
|
Karsten Hopp |
39439f |
if (!attr_pri)
|
|
Karsten Hopp |
39439f |
{
|
|
Karsten Hopp |
39439f |
n_attr = n_extra + 1;
|
|
Karsten Hopp |
39439f |
*** ../vim-7.4.352/src/testdir/Make_amiga.mak 2014-06-25 14:39:35.110348584 +0200
|
|
Karsten Hopp |
39439f |
--- src/testdir/Make_amiga.mak 2014-07-02 19:47:21.610363892 +0200
|
|
Karsten Hopp |
39439f |
***************
|
|
Karsten Hopp |
39439f |
*** 38,43 ****
|
|
Karsten Hopp |
39439f |
--- 38,44 ----
|
|
Karsten Hopp |
39439f |
test104.out test105.out test106.out test107.out \
|
|
Karsten Hopp |
39439f |
test_autoformat_join.out \
|
|
Karsten Hopp |
39439f |
test_breakindent.out \
|
|
Karsten Hopp |
39439f |
+ test_listlbr.out \
|
|
Karsten Hopp |
39439f |
test_eval.out \
|
|
Karsten Hopp |
39439f |
test_options.out
|
|
Karsten Hopp |
39439f |
|
|
Karsten Hopp |
39439f |
***************
|
|
Karsten Hopp |
39439f |
*** 165,169 ****
|
|
Karsten Hopp |
39439f |
--- 166,171 ----
|
|
Karsten Hopp |
39439f |
test107.out: test107.in
|
|
Karsten Hopp |
39439f |
test_autoformat_join.out: test_autoformat_join.in
|
|
Karsten Hopp |
39439f |
test_breakindent.out: test_breakindent.in
|
|
Karsten Hopp |
39439f |
+ test_listlbr.out: test_listlbr.in
|
|
Karsten Hopp |
39439f |
test_eval.out: test_eval.in
|
|
Karsten Hopp |
39439f |
test_options.out: test_options.in
|
|
Karsten Hopp |
39439f |
*** ../vim-7.4.352/src/testdir/Make_dos.mak 2014-06-25 14:39:35.110348584 +0200
|
|
Karsten Hopp |
39439f |
--- src/testdir/Make_dos.mak 2014-07-02 19:47:21.610363892 +0200
|
|
Karsten Hopp |
39439f |
***************
|
|
Karsten Hopp |
39439f |
*** 37,42 ****
|
|
Karsten Hopp |
39439f |
--- 37,43 ----
|
|
Karsten Hopp |
39439f |
test105.out test106.out test107.out\
|
|
Karsten Hopp |
39439f |
test_autoformat_join.out \
|
|
Karsten Hopp |
39439f |
test_breakindent.out \
|
|
Karsten Hopp |
39439f |
+ test_listlbr \
|
|
Karsten Hopp |
39439f |
test_eval.out \
|
|
Karsten Hopp |
39439f |
test_options.out
|
|
Karsten Hopp |
39439f |
|
|
Karsten Hopp |
39439f |
*** ../vim-7.4.352/src/testdir/Make_ming.mak 2014-06-25 14:39:35.110348584 +0200
|
|
Karsten Hopp |
39439f |
--- src/testdir/Make_ming.mak 2014-07-02 19:47:21.610363892 +0200
|
|
Karsten Hopp |
39439f |
***************
|
|
Karsten Hopp |
39439f |
*** 57,62 ****
|
|
Karsten Hopp |
39439f |
--- 57,63 ----
|
|
Karsten Hopp |
39439f |
test105.out test106.out test107.out \
|
|
Karsten Hopp |
39439f |
test_autoformat_join.out \
|
|
Karsten Hopp |
39439f |
test_breakindent.out \
|
|
Karsten Hopp |
39439f |
+ test_listlbr.out \
|
|
Karsten Hopp |
39439f |
test_eval.out \
|
|
Karsten Hopp |
39439f |
test_options.out
|
|
Karsten Hopp |
39439f |
|
|
Karsten Hopp |
39439f |
*** ../vim-7.4.352/src/testdir/Make_os2.mak 2014-06-25 14:39:35.114348584 +0200
|
|
Karsten Hopp |
39439f |
--- src/testdir/Make_os2.mak 2014-07-02 19:47:21.610363892 +0200
|
|
Karsten Hopp |
39439f |
***************
|
|
Karsten Hopp |
39439f |
*** 40,45 ****
|
|
Karsten Hopp |
39439f |
--- 40,46 ----
|
|
Karsten Hopp |
39439f |
test_autoformat_join.out \
|
|
Karsten Hopp |
39439f |
test_eval.out \
|
|
Karsten Hopp |
39439f |
test_breakindent.out \
|
|
Karsten Hopp |
39439f |
+ test_listlbr.out \
|
|
Karsten Hopp |
39439f |
test_options.out
|
|
Karsten Hopp |
39439f |
|
|
Karsten Hopp |
39439f |
.SUFFIXES: .in .out
|
|
Karsten Hopp |
39439f |
*** ../vim-7.4.352/src/testdir/Make_vms.mms 2014-06-25 14:39:35.114348584 +0200
|
|
Karsten Hopp |
39439f |
--- src/testdir/Make_vms.mms 2014-07-02 19:47:21.610363892 +0200
|
|
Karsten Hopp |
39439f |
***************
|
|
Karsten Hopp |
39439f |
*** 98,103 ****
|
|
Karsten Hopp |
39439f |
--- 98,104 ----
|
|
Karsten Hopp |
39439f |
test105.out test106.out test107.out \
|
|
Karsten Hopp |
39439f |
test_autoformat_join.out \
|
|
Karsten Hopp |
39439f |
test_breakindent.out \
|
|
Karsten Hopp |
39439f |
+ test_listlbr.out \
|
|
Karsten Hopp |
39439f |
test_eval.out \
|
|
Karsten Hopp |
39439f |
test_options.out
|
|
Karsten Hopp |
39439f |
|
|
Karsten Hopp |
39439f |
*** ../vim-7.4.352/src/testdir/Makefile 2014-06-25 14:39:35.114348584 +0200
|
|
Karsten Hopp |
39439f |
--- src/testdir/Makefile 2014-07-02 19:47:21.610363892 +0200
|
|
Karsten Hopp |
39439f |
***************
|
|
Karsten Hopp |
39439f |
*** 35,40 ****
|
|
Karsten Hopp |
39439f |
--- 35,41 ----
|
|
Karsten Hopp |
39439f |
test104.out test105.out test106.out test107.out \
|
|
Karsten Hopp |
39439f |
test_autoformat_join.out \
|
|
Karsten Hopp |
39439f |
test_breakindent.out \
|
|
Karsten Hopp |
39439f |
+ test_listlbr.out \
|
|
Karsten Hopp |
39439f |
test_eval.out \
|
|
Karsten Hopp |
39439f |
test_options.out
|
|
Karsten Hopp |
39439f |
|
|
Karsten Hopp |
39439f |
*** ../vim-7.4.352/src/testdir/test_listlbr.in 2014-07-02 19:58:25.642374067 +0200
|
|
Karsten Hopp |
39439f |
--- src/testdir/test_listlbr.in 2014-07-02 19:47:21.610363892 +0200
|
|
Karsten Hopp |
39439f |
***************
|
|
Karsten Hopp |
39439f |
*** 0 ****
|
|
Karsten Hopp |
39439f |
--- 1,62 ----
|
|
Karsten Hopp |
39439f |
+ Test for linebreak and list option
|
|
Karsten Hopp |
39439f |
+
|
|
Karsten Hopp |
39439f |
+ STARTTEST
|
|
Karsten Hopp |
39439f |
+ :so small.vim
|
|
Karsten Hopp |
39439f |
+ :if !exists("+linebreak") | e! test.ok | w! test.out | qa! | endif
|
|
Karsten Hopp |
39439f |
+ :10new|:vsp|:vert resize 20
|
|
Karsten Hopp |
39439f |
+ :put =\"\tabcdef hijklmn\tpqrstuvwxyz\u00a01060ABCDEFGHIJKLMNOP \"
|
|
Karsten Hopp |
39439f |
+ :norm! zt
|
|
Karsten Hopp |
39439f |
+ :set ts=4 sw=4 sts=4 linebreak sbr=+ wrap
|
|
Karsten Hopp |
39439f |
+ :fu! ScreenChar(width)
|
|
Karsten Hopp |
39439f |
+ : let c=''
|
|
Karsten Hopp |
39439f |
+ : for j in range(1,4)
|
|
Karsten Hopp |
39439f |
+ : for i in range(1,a:width)
|
|
Karsten Hopp |
39439f |
+ : let c.=nr2char(screenchar(j, i))
|
|
Karsten Hopp |
39439f |
+ : endfor
|
|
Karsten Hopp |
39439f |
+ : let c.="\n"
|
|
Karsten Hopp |
39439f |
+ : endfor
|
|
Karsten Hopp |
39439f |
+ : return c
|
|
Karsten Hopp |
39439f |
+ :endfu
|
|
Karsten Hopp |
39439f |
+ :fu! DoRecordScreen()
|
|
Karsten Hopp |
39439f |
+ : wincmd l
|
|
Karsten Hopp |
39439f |
+ : $put =printf(\"\n%s\", g:test)
|
|
Karsten Hopp |
39439f |
+ : $put =g:line
|
|
Karsten Hopp |
39439f |
+ : wincmd p
|
|
Karsten Hopp |
39439f |
+ :endfu
|
|
Karsten Hopp |
39439f |
+ :let g:test="Test 1: set linebreak"
|
|
Karsten Hopp |
39439f |
+ :redraw!
|
|
Karsten Hopp |
39439f |
+ :let line=ScreenChar(winwidth(0))
|
|
Karsten Hopp |
39439f |
+ :call DoRecordScreen()
|
|
Karsten Hopp |
39439f |
+ :let g:test="Test 2: set linebreak + set list"
|
|
Karsten Hopp |
39439f |
+ :set linebreak list listchars=
|
|
Karsten Hopp |
39439f |
+ :redraw!
|
|
Karsten Hopp |
39439f |
+ :let line=ScreenChar(winwidth(0))
|
|
Karsten Hopp |
39439f |
+ :call DoRecordScreen()
|
|
Karsten Hopp |
39439f |
+ :let g:test ="Test 3: set linebreak + set list + fancy listchars"
|
|
Karsten Hopp |
39439f |
+ :exe "set linebreak list listchars=nbsp:\u2423,tab:\u2595\u2014,trail:\u02d1,eol:\ub6"
|
|
Karsten Hopp |
39439f |
+ :redraw!
|
|
Karsten Hopp |
39439f |
+ :let line=ScreenChar(winwidth(0))
|
|
Karsten Hopp |
39439f |
+ :call DoRecordScreen()
|
|
Karsten Hopp |
39439f |
+ :let g:test ="Test 4: set linebreak nolist"
|
|
Karsten Hopp |
39439f |
+ :set nolist linebreak
|
|
Karsten Hopp |
39439f |
+ :redraw!
|
|
Karsten Hopp |
39439f |
+ :let line=ScreenChar(winwidth(0))
|
|
Karsten Hopp |
39439f |
+ :call DoRecordScreen()
|
|
Karsten Hopp |
39439f |
+ :let g:test ="Test 5: set nolinebreak list"
|
|
Karsten Hopp |
39439f |
+ :set list nolinebreak
|
|
Karsten Hopp |
39439f |
+ :redraw!
|
|
Karsten Hopp |
39439f |
+ :let line=ScreenChar(winwidth(0))
|
|
Karsten Hopp |
39439f |
+ :call DoRecordScreen()
|
|
Karsten Hopp |
39439f |
+ :let g:test ="Test 6: set linebreak with tab and 1 line as long as screen: should break!"
|
|
Karsten Hopp |
39439f |
+ :set nolist linebreak ts=8
|
|
Karsten Hopp |
39439f |
+ :let line="1\t".repeat('a', winwidth(0)-2)
|
|
Karsten Hopp |
39439f |
+ :$put =line
|
|
Karsten Hopp |
39439f |
+ :$
|
|
Karsten Hopp |
39439f |
+ :norm! zt
|
|
Karsten Hopp |
39439f |
+ :redraw!
|
|
Karsten Hopp |
39439f |
+ :let line=ScreenChar(winwidth(0))
|
|
Karsten Hopp |
39439f |
+ :call DoRecordScreen()
|
|
Karsten Hopp |
39439f |
+ :%w! test.out
|
|
Karsten Hopp |
39439f |
+ :qa!
|
|
Karsten Hopp |
39439f |
+ ENDTEST
|
|
Karsten Hopp |
39439f |
+ dummy text
|
|
Karsten Hopp |
39439f |
*** ../vim-7.4.352/src/testdir/test_listlbr.ok 2014-07-02 19:58:25.646374067 +0200
|
|
Karsten Hopp |
39439f |
--- src/testdir/test_listlbr.ok 2014-07-02 19:47:21.610363892 +0200
|
|
Karsten Hopp |
39439f |
***************
|
|
Karsten Hopp |
39439f |
*** 0 ****
|
|
Karsten Hopp |
39439f |
--- 1,39 ----
|
|
Karsten Hopp |
39439f |
+
|
|
Karsten Hopp |
39439f |
+ abcdef hijklmn pqrstuvwxyz 1060ABCDEFGHIJKLMNOP
|
|
Karsten Hopp |
39439f |
+
|
|
Karsten Hopp |
39439f |
+ Test 1: set linebreak
|
|
Karsten Hopp |
39439f |
+ abcdef
|
|
Karsten Hopp |
39439f |
+ +hijklmn
|
|
Karsten Hopp |
39439f |
+ +pqrstuvwxyz 1060ABC
|
|
Karsten Hopp |
39439f |
+ +DEFGHIJKLMNOP
|
|
Karsten Hopp |
39439f |
+
|
|
Karsten Hopp |
39439f |
+ Test 2: set linebreak + set list
|
|
Karsten Hopp |
39439f |
+ ^Iabcdef hijklmn^I
|
|
Karsten Hopp |
39439f |
+ +pqrstuvwxyz 1060ABC
|
|
Karsten Hopp |
39439f |
+ +DEFGHIJKLMNOP
|
|
Karsten Hopp |
39439f |
+
|
|
Karsten Hopp |
39439f |
+
|
|
Karsten Hopp |
39439f |
+ Test 3: set linebreak + set list + fancy listchars
|
|
Karsten Hopp |
39439f |
+ ▕———abcdef
|
|
Karsten Hopp |
39439f |
+ +hijklmn▕———
|
|
Karsten Hopp |
39439f |
+ +pqrstuvwxyz␣1060ABC
|
|
Karsten Hopp |
39439f |
+ +DEFGHIJKLMNOPˑ¶
|
|
Karsten Hopp |
39439f |
+
|
|
Karsten Hopp |
39439f |
+ Test 4: set linebreak nolist
|
|
Karsten Hopp |
39439f |
+ abcdef
|
|
Karsten Hopp |
39439f |
+ +hijklmn
|
|
Karsten Hopp |
39439f |
+ +pqrstuvwxyz 1060ABC
|
|
Karsten Hopp |
39439f |
+ +DEFGHIJKLMNOP
|
|
Karsten Hopp |
39439f |
+
|
|
Karsten Hopp |
39439f |
+ Test 5: set nolinebreak list
|
|
Karsten Hopp |
39439f |
+ ▕———abcdef hijklmn▕—
|
|
Karsten Hopp |
39439f |
+ +pqrstuvwxyz␣1060ABC
|
|
Karsten Hopp |
39439f |
+ +DEFGHIJKLMNOPˑ¶
|
|
Karsten Hopp |
39439f |
+ ¶
|
|
Karsten Hopp |
39439f |
+ 1 aaaaaaaaaaaaaaaaaa
|
|
Karsten Hopp |
39439f |
+
|
|
Karsten Hopp |
39439f |
+ Test 6: set linebreak with tab and 1 line as long as screen: should break!
|
|
Karsten Hopp |
39439f |
+ 1
|
|
Karsten Hopp |
39439f |
+ +aaaaaaaaaaaaaaaaaa
|
|
Karsten Hopp |
39439f |
+ ~
|
|
Karsten Hopp |
39439f |
+ ~
|
|
Karsten Hopp |
39439f |
*** ../vim-7.4.352/src/version.c 2014-07-02 19:37:38.462354956 +0200
|
|
Karsten Hopp |
39439f |
--- src/version.c 2014-07-02 19:57:44.066373430 +0200
|
|
Karsten Hopp |
39439f |
***************
|
|
Karsten Hopp |
39439f |
*** 736,737 ****
|
|
Karsten Hopp |
39439f |
--- 736,739 ----
|
|
Karsten Hopp |
39439f |
{ /* Add new patch number below this line */
|
|
Karsten Hopp |
39439f |
+ /**/
|
|
Karsten Hopp |
39439f |
+ 353,
|
|
Karsten Hopp |
39439f |
/**/
|
|
Karsten Hopp |
39439f |
|
|
Karsten Hopp |
39439f |
--
|
|
Karsten Hopp |
39439f |
FATHER: You only killed the bride's father - that's all -
|
|
Karsten Hopp |
39439f |
LAUNCELOT: Oh dear, I didn't really mean to...
|
|
Karsten Hopp |
39439f |
FATHER: Didn't mean to? You put your sword right through his head!
|
|
Karsten Hopp |
39439f |
LAUNCELOT: Gosh - Is he all right?
|
|
Karsten Hopp |
39439f |
"Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD
|
|
Karsten Hopp |
39439f |
|
|
Karsten Hopp |
39439f |
/// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
|
|
Karsten Hopp |
39439f |
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
|
|
Karsten Hopp |
39439f |
\\\ an exciting new programming language -- http://www.Zimbu.org ///
|
|
Karsten Hopp |
39439f |
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
|