Patch 7.4.2109
Problem: Setting 'display' to "lastline" is a drastic change, while
omitting it results in lots of "@" lines.
Solution: Add "truncate" to show "@@@" for a truncated line.
Files: src/option.h, src/screen.c, runtime/doc/options.txt
*** ../vim-7.4.2108/src/option.h 2016-07-16 14:46:51.131240585 +0200
--- src/option.h 2016-07-27 23:08:37.760127050 +0200
***************
*** 454,463 ****
EXTERN char_u *p_dy; /* 'display' */
EXTERN unsigned dy_flags;
#ifdef IN_OPTION_C
! static char *(p_dy_values[]) = {"lastline", "uhex", NULL};
#endif
#define DY_LASTLINE 0x001
! #define DY_UHEX 0x002
EXTERN int p_ed; /* 'edcompatible' */
#ifdef FEAT_WINDOWS
EXTERN char_u *p_ead; /* 'eadirection' */
--- 454,464 ----
EXTERN char_u *p_dy; /* 'display' */
EXTERN unsigned dy_flags;
#ifdef IN_OPTION_C
! static char *(p_dy_values[]) = {"lastline", "truncate", "uhex", NULL};
#endif
#define DY_LASTLINE 0x001
! #define DY_TRUNCATE 0x002
! #define DY_UHEX 0x004
EXTERN int p_ed; /* 'edcompatible' */
#ifdef FEAT_WINDOWS
EXTERN char_u *p_ead; /* 'eadirection' */
*** ../vim-7.4.2108/src/screen.c 2016-07-24 21:58:39.716057524 +0200
--- src/screen.c 2016-07-27 23:15:56.959956353 +0200
***************
*** 2018,2024 ****
&& wp->w_lines[idx].wl_valid
&& wp->w_lines[idx].wl_lnum == lnum
&& lnum > wp->w_topline
! && !(dy_flags & DY_LASTLINE)
&& srow + wp->w_lines[idx].wl_size > wp->w_height
#ifdef FEAT_DIFF
&& diff_check_fill(wp, lnum) == 0
--- 2018,2024 ----
&& wp->w_lines[idx].wl_valid
&& wp->w_lines[idx].wl_lnum == lnum
&& lnum > wp->w_topline
! && !(dy_flags & (DY_LASTLINE | DY_TRUNCATE))
&& srow + wp->w_lines[idx].wl_size > wp->w_height
#ifdef FEAT_DIFF
&& diff_check_fill(wp, lnum) == 0
***************
*** 2139,2144 ****
--- 2139,2159 ----
wp->w_filler_rows = wp->w_height - srow;
}
#endif
+ else if (dy_flags & DY_TRUNCATE) /* 'display' has "truncate" */
+ {
+ int scr_row = W_WINROW(wp) + wp->w_height - 1;
+
+ /*
+ * Last line isn't finished: Display "@@@" in the last screen line.
+ */
+ screen_puts_len((char_u *)"@@", 2, scr_row, W_WINCOL(wp),
+ hl_attr(HLF_AT));
+ screen_fill(scr_row, scr_row + 1,
+ (int)W_WINCOL(wp) + 2, (int)W_ENDCOL(wp),
+ '@', ' ', hl_attr(HLF_AT));
+ set_empty_rows(wp, srow);
+ wp->w_botline = lnum;
+ }
else if (dy_flags & DY_LASTLINE) /* 'display' has "lastline" */
{
/*
*** ../vim-7.4.2108/runtime/doc/options.txt 2016-05-24 10:46:41.659541832
+0200
--- runtime/doc/options.txt 2016-07-27 23:21:41.968680055 +0200
***************
*** 2617,2627 ****
Change the way text is displayed. This is comma separated list of
flags:
lastline When included, as much as possible of the last line
! in a window will be displayed. When not included, a
! last line that doesn't fit is replaced with "@" lines.
uhex Show unprintable characters hexadecimal as <xx>
instead of using ^C and ~C.
*'eadirection'* *'ead'*
'eadirection' 'ead' string (default "both")
global
--- 2623,2639 ----
Change the way text is displayed. This is comma separated list of
flags:
lastline When included, as much as possible of the last line
! in a window will be displayed. "@@@" is put in the
! last columns of the last screen line to indicate the
! rest of the line is not displayed.
! truncate Like "lastline", but "@@@" is displayed in the first
! column of the last screen line. Overrules "lastline".
uhex Show unprintable characters hexadecimal as <xx>
instead of using ^C and ~C.
+ When neither "lastline" or "truncate" is included, a last line that
+ doesn't fit is replaced with "@" lines.
+
*'eadirection'* *'ead'*
'eadirection' 'ead' string (default "both")
global
*** ../vim-7.4.2108/src/version.c 2016-07-27 22:56:43.734928810 +0200
--- src/version.c 2016-07-27 23:22:22.896291392 +0200
***************
*** 760,761 ****
--- 760,763 ----
{ /* Add new patch number below this line */
+ /**/
+ 2109,
/**/
--
BRIDGEKEEPER: What is the air-speed velocity of an unladen swallow?
ARTHUR: What do you mean? An African or European swallow?
BRIDGEKEEPER: Er ... I don't know that ... Aaaaarrrrrrggghhh!
BRIDGEKEEPER is cast into the gorge.
"Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD
/// 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.