Merge #8035 from justinmk/teto-fillchars-pr

This commit is contained in:
Justin M. Keyes 2018-02-23 01:14:30 +01:00 committed by GitHub
commit f3f1970597
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
14 changed files with 309 additions and 264 deletions

View File

@ -2377,7 +2377,7 @@ A jump table for the options with a short description can be found at |Q_op|.
Only normal file name characters can be used, "/\*?[|<>" are illegal.
*'fillchars'* *'fcs'*
'fillchars' 'fcs' string (default "vert:|,fold:-")
'fillchars' 'fcs' string (default "")
global
{not available when compiled without the |+windows|
and |+folding| features}
@ -2387,16 +2387,19 @@ A jump table for the options with a short description can be found at |Q_op|.
item default Used for ~
stl:c ' ' or '^' statusline of the current window
stlnc:c ' ' or '=' statusline of the non-current windows
vert:c '|' vertical separators |:vsplit|
fold:c '-' filling 'foldtext'
vert:c '│' or '|' vertical separators |:vsplit|
fold:c '·' or '-' filling 'foldtext'
diff:c '-' deleted lines of the 'diff' option
Any one that is omitted will fall back to the default. For "stl" and
"stlnc" the space will be used when there is highlighting, '^' or '='
otherwise.
If 'ambiwidth' is "double" then "vert" and "fold" default to
single-byte alternatives.
Example: >
:set fillchars=stl:^,stlnc:=,vert:\|,fold:-,diff:-
:set fillchars=stl:^,stlnc:=,vert:│,fold:·,diff:-
< This is similar to the default, except that these characters will also
be used when there is highlighting.

View File

@ -35,6 +35,7 @@ a complete and centralized reference of those differences.
- 'cscopeverbose' is enabled
- 'directory' defaults to ~/.local/share/nvim/swap// (|xdg|), auto-created
- 'display' defaults to "lastline"
- 'fillchars' defaults (in effect) to "vert:│,fold:·"
- 'formatoptions' defaults to "tcqj"
- 'history' defaults to 10000 (the maximum)
- 'hlsearch' is set by default

View File

@ -937,7 +937,7 @@ extern char_u *compiled_sys;
* directory is not a local directory, globaldir is NULL. */
EXTERN char_u *globaldir INIT(= NULL);
/* Characters from 'listchars' option */
// 'listchars' characters. Defaults are overridden in set_chars_option().
EXTERN int lcs_eol INIT(= '$');
EXTERN int lcs_ext INIT(= NUL);
EXTERN int lcs_prec INIT(= NUL);
@ -948,11 +948,11 @@ EXTERN int lcs_tab2 INIT(= NUL);
EXTERN int lcs_trail INIT(= NUL);
EXTERN int lcs_conceal INIT(= ' ');
/* Characters from 'fillchars' option */
// 'fillchars' characters. Defaults are overridden in set_chars_option().
EXTERN int fill_stl INIT(= ' ');
EXTERN int fill_stlnc INIT(= ' ');
EXTERN int fill_vert INIT(= ' ');
EXTERN int fill_fold INIT(= '-');
EXTERN int fill_vert INIT(= 9474); // │
EXTERN int fill_fold INIT(= 183); // ·
EXTERN int fill_diff INIT(= '-');
/* Whether 'keymodel' contains "stopsel" and "startsel". */

View File

@ -3381,37 +3381,38 @@ skip:
return NULL; /* no error */
}
/*
* Handle setting 'listchars' or 'fillchars'.
* Returns error message, NULL if it's OK.
*/
/// Handle setting 'listchars' or 'fillchars'.
/// Assume monocell characters
///
/// @param varp either &p_lcs ('listchars') or &p_fcs ('fillchar')
/// @return error message, NULL if it's OK.
static char_u *set_chars_option(char_u **varp)
{
int round, i, len, entries;
char_u *p, *s;
int c1, c2 = 0;
struct charstab {
int *cp;
char *name;
int *cp; ///< char value
char *name; ///< char id
int def; ///< default value
};
static struct charstab filltab[] =
{
{&fill_stl, "stl"},
{&fill_stlnc, "stlnc"},
{&fill_vert, "vert"},
{&fill_fold, "fold"},
{&fill_diff, "diff"},
static struct charstab filltab[] = {
{ &fill_stl, "stl" , ' ' },
{ &fill_stlnc, "stlnc", ' ' },
{ &fill_vert, "vert" , 9474 }, // │
{ &fill_fold, "fold" , 183 }, // ·
{ &fill_diff, "diff" , '-' },
};
static struct charstab lcstab[] =
{
{&lcs_eol, "eol"},
{&lcs_ext, "extends"},
{&lcs_nbsp, "nbsp"},
{&lcs_prec, "precedes"},
{&lcs_space, "space"},
{&lcs_tab2, "tab"},
{&lcs_trail, "trail"},
{&lcs_conceal, "conceal"},
static struct charstab lcstab[] = {
{ &lcs_eol, "eol", NUL },
{ &lcs_ext, "extends", NUL },
{ &lcs_nbsp, "nbsp", NUL },
{ &lcs_prec, "precedes", NUL },
{ &lcs_space, "space", NUL },
{ &lcs_tab2, "tab", NUL },
{ &lcs_trail, "trail", NUL },
{ &lcs_conceal, "conceal", NUL },
};
struct charstab *tab;
@ -3421,20 +3422,29 @@ static char_u *set_chars_option(char_u **varp)
} else {
tab = filltab;
entries = ARRAY_SIZE(filltab);
if (*p_ambw == 'd') {
// XXX: If ambiwidth=double then "|" and "·" take 2 columns, which is
// forbidden (TUI limitation?). Set old defaults.
filltab[2].def = '|';
filltab[3].def = '-';
} else {
filltab[2].def = 9474; // │
filltab[3].def = 183; // ·
}
}
/* first round: check for valid value, second round: assign values */
for (round = 0; round <= 1; ++round) {
// first round: check for valid value, second round: assign values
for (round = 0; round <= 1; round++) {
if (round > 0) {
/* After checking that the value is valid: set defaults: space for
* 'fillchars', NUL for 'listchars' */
for (i = 0; i < entries; ++i)
if (tab[i].cp != NULL)
*(tab[i].cp) = (varp == &p_lcs ? NUL : ' ');
if (varp == &p_lcs)
// After checking that the value is valid: set defaults
for (i = 0; i < entries; i++) {
if (tab[i].cp != NULL) {
*(tab[i].cp) = tab[i].def;
}
}
if (varp == &p_lcs) {
lcs_tab1 = NUL;
else
fill_diff = '-';
}
}
p = *varp;
while (*p) {

View File

@ -812,7 +812,7 @@ return {
vi_def=true,
redraw={'all_windows'},
varname='p_fcs',
defaults={if_true={vi="vert:|,fold:-"}}
defaults={if_true={vi=''}}
},
{
full_name='fixendofline', abbreviation='fixeol',

View File

@ -7088,11 +7088,7 @@ static int fillchar_status(int *attr, win_T *wp)
static int fillchar_vsep(win_T *wp, int *attr)
{
*attr = win_hl_attr(wp, HLF_C);
if (*attr == 0 && fill_vert == ' ') {
return '|';
} else {
return fill_vert;
}
return fill_vert;
}
/*

View File

@ -6,6 +6,7 @@ set directory^=.
set backspace=
set nohidden smarttab noautoindent noautoread complete-=i noruler noshowcmd
set listchars=eol:$
set fillchars=vert:\|,fold:-
" Prevent Nvim log from writing to stderr.
let $NVIM_LOG_FILE = exists($NVIM_LOG_FILE) ? $NVIM_LOG_FILE : 'Xnvim.log'

View File

@ -44,14 +44,14 @@ describe(":drop", function()
feed_command("edit tmp2")
feed_command("drop tmp1")
screen:expect([[
{2:|}^ |
{0:~ }{2:|}{0:~ }|
{0:~ }{2:|}{0:~ }|
{0:~ }{2:|}{0:~ }|
{0:~ }{2:|}{0:~ }|
{0:~ }{2:|}{0:~ }|
{0:~ }{2:|}{0:~ }|
{0:~ }{2:|}{0:~ }|
{2:}^ |
{0:~ }{2:}{0:~ }|
{0:~ }{2:}{0:~ }|
{0:~ }{2:}{0:~ }|
{0:~ }{2:}{0:~ }|
{0:~ }{2:}{0:~ }|
{0:~ }{2:}{0:~ }|
{0:~ }{2:}{0:~ }|
{2:tmp2 }{1:tmp1 }|
:drop tmp1 |
]])
@ -64,14 +64,14 @@ describe(":drop", function()
feed("iABC<esc>")
feed_command("drop tmp3")
screen:expect([[
^ {2:|} |
{0:~ }{2:|}{0:~ }|
{0:~ }{2:|}{0:~ }|
{0:~ }{2:|}{0:~ }|
{1:tmp3 }{2:|}{0:~ }|
ABC {2:|}{0:~ }|
{0:~ }{2:|}{0:~ }|
{0:~ }{2:|}{0:~ }|
^ {2:} |
{0:~ }{2:}{0:~ }|
{0:~ }{2:}{0:~ }|
{0:~ }{2:}{0:~ }|
{1:tmp3 }{2:}{0:~ }|
ABC {2:}{0:~ }|
{0:~ }{2:}{0:~ }|
{0:~ }{2:}{0:~ }|
{2:tmp2 [+] tmp1 }|
"tmp3" [New File] |
]])

View File

@ -7,6 +7,7 @@ local command = helpers.command
local clear = helpers.clear
local eval = helpers.eval
local eq = helpers.eq
local insert = helpers.insert
local neq = helpers.neq
local mkdir = helpers.mkdir
local rmdir = helpers.rmdir
@ -115,7 +116,40 @@ describe('startup defaults', function()
end)
end)
describe('packpath', function()
describe("'fillchars'", function()
it('vert/fold flags', function()
clear()
local screen = Screen.new(50, 5)
screen:attach()
command('set laststatus=0')
insert([[
1
2
3
4]])
command('normal! ggjzfj')
command('vsp')
screen:expect([[
1 1 |
^+-- 2 lines: 2··········+-- 2 lines: 2·········|
4 4 |
~ ~ |
|
]])
-- ambiwidth=double defaults to single-byte fillchars.
command('set ambiwidth=double')
screen:expect([[
1 |1 |
^+-- 2 lines: 2----------|+-- 2 lines: 2---------|
4 |4 |
~ |~ |
|
]])
end)
end)
describe("'packpath'", function()
it('defaults to &runtimepath', function()
eq(meths.get_option('runtimepath'), meths.get_option('packpath'))
end)

View File

@ -98,41 +98,41 @@ describe('terminal mouse', function()
before_each(function()
feed('<c-\\><c-n>:vsp<cr>')
screen:expect([[
line28 |line28 |
line29 |line29 |
line30 |line30 |
rows: 5, cols: 24 |rows: 5, cols: 24 |
{2:^ } |{2: } |
line28 line28 |
line29 line29 |
line30 line30 |
rows: 5, cols: 24 rows: 5, cols: 24 |
{2:^ } {2: } |
========== ========== |
:vsp |
]])
feed(':enew | set number<cr>')
screen:expect([[
{7: 1 }^ |line28 |
{4:~ }|line29 |
{4:~ }|line30 |
{4:~ }|rows: 5, cols: 24 |
{4:~ }|{2: } |
{7: 1 }^ line28 |
{4:~ }line29 |
{4:~ }line30 |
{4:~ }rows: 5, cols: 24 |
{4:~ }{2: } |
========== ========== |
:enew | set number |
]])
feed('30iline\n<esc>')
screen:expect([[
{7: 27 }line |line28 |
{7: 28 }line |line29 |
{7: 29 }line |line30 |
{7: 30 }line |rows: 5, cols: 24 |
{7: 31 }^ |{2: } |
{7: 27 }line line28 |
{7: 28 }line line29 |
{7: 29 }line line30 |
{7: 30 }line rows: 5, cols: 24 |
{7: 31 }^ {2: } |
========== ========== |
|
]])
feed('<c-w>li')
screen:expect([[
{7: 27 }line |line28 |
{7: 28 }line |line29 |
{7: 29 }line |line30 |
{7: 30 }line |rows: 5, cols: 24 |
{7: 31 } |{1: } |
{7: 27 }line line28 |
{7: 28 }line line29 |
{7: 29 }line line30 |
{7: 30 }line rows: 5, cols: 24 |
{7: 31 } {1: } |
========== ========== |
{3:-- TERMINAL --} |
]])
@ -140,11 +140,11 @@ describe('terminal mouse', function()
thelpers.enable_mouse()
thelpers.feed_data('mouse enabled\n')
screen:expect([[
{7: 27 }line |line29 |
{7: 28 }line |line30 |
{7: 29 }line |rows: 5, cols: 24 |
{7: 30 }line |mouse enabled |
{7: 31 } |{1: } |
{7: 27 }line line29 |
{7: 28 }line line30 |
{7: 29 }line rows: 5, cols: 24 |
{7: 30 }line mouse enabled |
{7: 31 } {1: } |
========== ========== |
{3:-- TERMINAL --} |
]])
@ -153,21 +153,21 @@ describe('terminal mouse', function()
it('wont lose focus if another window is scrolled', function()
feed('<ScrollWheelUp><0,0><ScrollWheelUp><0,0>')
screen:expect([[
{7: 21 }line |line29 |
{7: 22 }line |line30 |
{7: 23 }line |rows: 5, cols: 24 |
{7: 24 }line |mouse enabled |
{7: 25 }line |{1: } |
{7: 21 }line line29 |
{7: 22 }line line30 |
{7: 23 }line rows: 5, cols: 24 |
{7: 24 }line mouse enabled |
{7: 25 }line {1: } |
========== ========== |
{3:-- TERMINAL --} |
]])
feed('<S-ScrollWheelDown><0,0>')
screen:expect([[
{7: 26 }line |line29 |
{7: 27 }line |line30 |
{7: 28 }line |rows: 5, cols: 24 |
{7: 29 }line |mouse enabled |
{7: 30 }line |{1: } |
{7: 26 }line line29 |
{7: 27 }line line30 |
{7: 28 }line rows: 5, cols: 24 |
{7: 29 }line mouse enabled |
{7: 30 }line {1: } |
========== ========== |
{3:-- TERMINAL --} |
]])
@ -176,11 +176,11 @@ describe('terminal mouse', function()
it('will lose focus if another window is clicked', function()
feed('<LeftMouse><5,1>')
screen:expect([[
{7: 27 }line |line29 |
{7: 28 }l^ine |line30 |
{7: 29 }line |rows: 5, cols: 24 |
{7: 30 }line |mouse enabled |
{7: 31 } |{2: } |
{7: 27 }line line29 |
{7: 28 }l^ine line30 |
{7: 29 }line rows: 5, cols: 24 |
{7: 30 }line mouse enabled |
{7: 31 } {2: } |
========== ========== |
|
]])

View File

@ -108,12 +108,12 @@ describe('highlight defaults', function()
})
feed_command('sp', 'vsp', 'vsp')
screen:expect([[
^ {2:|} {2:|} |
{0:~ }{2:|}{0:~ }{2:|}{0:~ }|
{0:~ }{2:|}{0:~ }{2:|}{0:~ }|
{0:~ }{2:|}{0:~ }{2:|}{0:~ }|
{0:~ }{2:|}{0:~ }{2:|}{0:~ }|
{0:~ }{2:|}{0:~ }{2:|}{0:~ }|
^ {2:} {2:} |
{0:~ }{2:}{0:~ }{2:}{0:~ }|
{0:~ }{2:}{0:~ }{2:}{0:~ }|
{0:~ }{2:}{0:~ }{2:}{0:~ }|
{0:~ }{2:}{0:~ }{2:}{0:~ }|
{0:~ }{2:}{0:~ }{2:}{0:~ }|
{1:[No Name] }{2:[No Name] [No Name] }|
|
{0:~ }|
@ -126,12 +126,12 @@ describe('highlight defaults', function()
-- navigate to verify that the attributes are properly moved
feed('<c-w>j')
screen:expect([[
{2:|} {2:|} |
{0:~ }{2:|}{0:~ }{2:|}{0:~ }|
{0:~ }{2:|}{0:~ }{2:|}{0:~ }|
{0:~ }{2:|}{0:~ }{2:|}{0:~ }|
{0:~ }{2:|}{0:~ }{2:|}{0:~ }|
{0:~ }{2:|}{0:~ }{2:|}{0:~ }|
{2:} {2:} |
{0:~ }{2:}{0:~ }{2:}{0:~ }|
{0:~ }{2:}{0:~ }{2:}{0:~ }|
{0:~ }{2:}{0:~ }{2:}{0:~ }|
{0:~ }{2:}{0:~ }{2:}{0:~ }|
{0:~ }{2:}{0:~ }{2:}{0:~ }|
{2:[No Name] [No Name] [No Name] }|
^ |
{0:~ }|
@ -146,12 +146,12 @@ describe('highlight defaults', function()
-- (upstream vim has the same behavior)
feed('<c-w>k<c-w>l')
screen:expect([[
{2:|}^ {2:|} |
{0:~ }{2:|}{0:~ }{2:|}{0:~ }|
{0:~ }{2:|}{0:~ }{2:|}{0:~ }|
{0:~ }{2:|}{0:~ }{2:|}{0:~ }|
{0:~ }{2:|}{0:~ }{2:|}{0:~ }|
{0:~ }{2:|}{0:~ }{2:|}{0:~ }|
{2:}^ {2:} |
{0:~ }{2:}{0:~ }{2:}{0:~ }|
{0:~ }{2:}{0:~ }{2:}{0:~ }|
{0:~ }{2:}{0:~ }{2:}{0:~ }|
{0:~ }{2:}{0:~ }{2:}{0:~ }|
{0:~ }{2:}{0:~ }{2:}{0:~ }|
{2:[No Name] }{1:[No Name] }{2:[No Name] }|
|
{0:~ }|
@ -163,12 +163,12 @@ describe('highlight defaults', function()
]])
feed('<c-w>l')
screen:expect([[
{2:|} {2:|}^ |
{0:~ }{2:|}{0:~ }{2:|}{0:~ }|
{0:~ }{2:|}{0:~ }{2:|}{0:~ }|
{0:~ }{2:|}{0:~ }{2:|}{0:~ }|
{0:~ }{2:|}{0:~ }{2:|}{0:~ }|
{0:~ }{2:|}{0:~ }{2:|}{0:~ }|
{2:} {2:}^ |
{0:~ }{2:}{0:~ }{2:}{0:~ }|
{0:~ }{2:}{0:~ }{2:}{0:~ }|
{0:~ }{2:}{0:~ }{2:}{0:~ }|
{0:~ }{2:}{0:~ }{2:}{0:~ }|
{0:~ }{2:}{0:~ }{2:}{0:~ }|
{2:[No Name] [No Name] }{1:[No Name] }|
|
{0:~ }|
@ -180,12 +180,12 @@ describe('highlight defaults', function()
]])
feed('<c-w>h<c-w>h')
screen:expect([[
^ {2:|} {2:|} |
{0:~ }{2:|}{0:~ }{2:|}{0:~ }|
{0:~ }{2:|}{0:~ }{2:|}{0:~ }|
{0:~ }{2:|}{0:~ }{2:|}{0:~ }|
{0:~ }{2:|}{0:~ }{2:|}{0:~ }|
{0:~ }{2:|}{0:~ }{2:|}{0:~ }|
^ {2:} {2:} |
{0:~ }{2:}{0:~ }{2:}{0:~ }|
{0:~ }{2:}{0:~ }{2:}{0:~ }|
{0:~ }{2:}{0:~ }{2:}{0:~ }|
{0:~ }{2:}{0:~ }{2:}{0:~ }|
{0:~ }{2:}{0:~ }{2:}{0:~ }|
{1:[No Name] }{2:[No Name] [No Name] }|
|
{0:~ }|

View File

@ -1638,26 +1638,26 @@ describe("'inccommand' split windows", function()
feed_command("split")
feed(":%s/tw")
screen:expect([[
Inc substitution on {10:|}Inc substitution on|
{12:tw}o lines {10:|}{12:tw}o lines |
{10:|} |
{15:~ }{10:|}{15:~ }|
{15:~ }{10:|}{15:~ }|
{15:~ }{10:|}{15:~ }|
{15:~ }{10:|}{15:~ }|
{15:~ }{10:|}{15:~ }|
{15:~ }{10:|}{15:~ }|
{15:~ }{10:|}{15:~ }|
{15:~ }{10:|}{15:~ }|
{15:~ }{10:|}{15:~ }|
{15:~ }{10:|}{15:~ }|
{15:~ }{10:|}{15:~ }|
{11:[No Name] [+] }{10:|}{15:~ }|
Inc substitution on {10:|}{15:~ }|
{12:tw}o lines {10:|}{15:~ }|
{10:|}{15:~ }|
{15:~ }{10:|}{15:~ }|
{15:~ }{10:|}{15:~ }|
Inc substitution on {10:}Inc substitution on|
{12:tw}o lines {10:}{12:tw}o lines |
{10:} |
{15:~ }{10:}{15:~ }|
{15:~ }{10:}{15:~ }|
{15:~ }{10:}{15:~ }|
{15:~ }{10:}{15:~ }|
{15:~ }{10:}{15:~ }|
{15:~ }{10:}{15:~ }|
{15:~ }{10:}{15:~ }|
{15:~ }{10:}{15:~ }|
{15:~ }{10:}{15:~ }|
{15:~ }{10:}{15:~ }|
{15:~ }{10:}{15:~ }|
{11:[No Name] [+] }{10:}{15:~ }|
Inc substitution on {10:}{15:~ }|
{12:tw}o lines {10:}{15:~ }|
{10:}{15:~ }|
{15:~ }{10:}{15:~ }|
{15:~ }{10:}{15:~ }|
{10:[No Name] [+] [No Name] [+] }|
|2| {12:tw}o lines |
{15:~ }|
@ -1677,20 +1677,20 @@ describe("'inccommand' split windows", function()
feed(":%s/tw")
screen:expect([[
Inc substitution on {10:|}Inc substitution on|
{12:tw}o lines {10:|}{12:tw}o lines |
{10:|} |
{15:~ }{10:|}{15:~ }|
{15:~ }{10:|}{15:~ }|
{15:~ }{10:|}{15:~ }|
{15:~ }{10:|}{15:~ }|
{15:~ }{10:|}{15:~ }|
{15:~ }{10:|}{15:~ }|
{15:~ }{10:|}{15:~ }|
{15:~ }{10:|}{15:~ }|
{15:~ }{10:|}{15:~ }|
{15:~ }{10:|}{15:~ }|
{15:~ }{10:|}{15:~ }|
Inc substitution on {10:}Inc substitution on|
{12:tw}o lines {10:}{12:tw}o lines |
{10:} |
{15:~ }{10:}{15:~ }|
{15:~ }{10:}{15:~ }|
{15:~ }{10:}{15:~ }|
{15:~ }{10:}{15:~ }|
{15:~ }{10:}{15:~ }|
{15:~ }{10:}{15:~ }|
{15:~ }{10:}{15:~ }|
{15:~ }{10:}{15:~ }|
{15:~ }{10:}{15:~ }|
{15:~ }{10:}{15:~ }|
{15:~ }{10:}{15:~ }|
{11:[No Name] [+] }{10:[No Name] [+] }|
Inc substitution on |
{12:tw}o lines |

View File

@ -638,12 +638,12 @@ describe('ui/mouse/input', function()
screen:try_resize(53, 14)
feed_command('sp', 'vsp')
screen:expect([[
lines {4:|}lines |
to {4:|}to |
test {4:|}test |
mouse scrolling {4:|}mouse scrolling |
^ {4:|} |
{0:~ }{4:|}{0:~ }|
lines {4:}lines |
to {4:}to |
test {4:}test |
mouse scrolling {4:}mouse scrolling |
^ {4:} |
{0:~ }{4:}{0:~ }|
{5:[No Name] [+] }{4:[No Name] [+] }|
to |
test |
@ -655,12 +655,12 @@ describe('ui/mouse/input', function()
]])
feed('<ScrollWheelDown><0,0>')
screen:expect([[
mouse scrolling {4:|}lines |
^ {4:|}to |
{0:~ }{4:|}test |
{0:~ }{4:|}mouse scrolling |
{0:~ }{4:|} |
{0:~ }{4:|}{0:~ }|
mouse scrolling {4:}lines |
^ {4:}to |
{0:~ }{4:}test |
{0:~ }{4:}mouse scrolling |
{0:~ }{4:} |
{0:~ }{4:}{0:~ }|
{5:[No Name] [+] }{4:[No Name] [+] }|
to |
test |
@ -672,12 +672,12 @@ describe('ui/mouse/input', function()
]])
feed('<ScrollWheelUp><27,0>')
screen:expect([[
mouse scrolling {4:|}text |
^ {4:|}with |
{0:~ }{4:|}many |
{0:~ }{4:|}lines |
{0:~ }{4:|}to |
{0:~ }{4:|}test |
mouse scrolling {4:}text |
^ {4:}with |
{0:~ }{4:}many |
{0:~ }{4:}lines |
{0:~ }{4:}to |
{0:~ }{4:}test |
{5:[No Name] [+] }{4:[No Name] [+] }|
to |
test |
@ -689,12 +689,12 @@ describe('ui/mouse/input', function()
]])
feed('<ScrollWheelUp><27,7><ScrollWheelUp>')
screen:expect([[
mouse scrolling {4:|}text |
^ {4:|}with |
{0:~ }{4:|}many |
{0:~ }{4:|}lines |
{0:~ }{4:|}to |
{0:~ }{4:|}test |
mouse scrolling {4:}text |
^ {4:}with |
{0:~ }{4:}many |
{0:~ }{4:}lines |
{0:~ }{4:}to |
{0:~ }{4:}test |
{5:[No Name] [+] }{4:[No Name] [+] }|
Inserting |
text |

View File

@ -189,12 +189,12 @@ describe('Screen', function()
command('vsp')
command('vsp')
screen:expect([[
^ {3:|} {3:|} |
{0:~ }{3:|}{0:~ }{3:|}{0:~ }|
{0:~ }{3:|}{0:~ }{3:|}{0:~ }|
{0:~ }{3:|}{0:~ }{3:|}{0:~ }|
{0:~ }{3:|}{0:~ }{3:|}{0:~ }|
{0:~ }{3:|}{0:~ }{3:|}{0:~ }|
^ {3:} {3:} |
{0:~ }{3:}{0:~ }{3:}{0:~ }|
{0:~ }{3:}{0:~ }{3:}{0:~ }|
{0:~ }{3:}{0:~ }{3:}{0:~ }|
{0:~ }{3:}{0:~ }{3:}{0:~ }|
{0:~ }{3:}{0:~ }{3:}{0:~ }|
{1:[No Name] }{3:[No Name] [No Name] }|
|
{0:~ }|
@ -206,12 +206,12 @@ describe('Screen', function()
]])
insert('hello')
screen:expect([[
hell^o {3:|}hello {3:|}hello |
{0:~ }{3:|}{0:~ }{3:|}{0:~ }|
{0:~ }{3:|}{0:~ }{3:|}{0:~ }|
{0:~ }{3:|}{0:~ }{3:|}{0:~ }|
{0:~ }{3:|}{0:~ }{3:|}{0:~ }|
{0:~ }{3:|}{0:~ }{3:|}{0:~ }|
hell^o {3:}hello {3:}hello |
{0:~ }{3:}{0:~ }{3:}{0:~ }|
{0:~ }{3:}{0:~ }{3:}{0:~ }|
{0:~ }{3:}{0:~ }{3:}{0:~ }|
{0:~ }{3:}{0:~ }{3:}{0:~ }|
{0:~ }{3:}{0:~ }{3:}{0:~ }|
{1:[No Name] [+] }{3:[No Name] [+] [No Name] [+] }|
hello |
{0:~ }|
@ -232,12 +232,12 @@ describe('Screen', function()
command('vsp')
insert('hello')
screen:expect([[
hell^o {3:|}hello {3:|}hello |
{0:~ }{3:|}{0:~ }{3:|}{0:~ }|
{0:~ }{3:|}{0:~ }{3:|}{0:~ }|
{0:~ }{3:|}{0:~ }{3:|}{0:~ }|
{0:~ }{3:|}{0:~ }{3:|}{0:~ }|
{0:~ }{3:|}{0:~ }{3:|}{0:~ }|
hell^o {3:}hello {3:}hello |
{0:~ }{3:}{0:~ }{3:}{0:~ }|
{0:~ }{3:}{0:~ }{3:}{0:~ }|
{0:~ }{3:}{0:~ }{3:}{0:~ }|
{0:~ }{3:}{0:~ }{3:}{0:~ }|
{0:~ }{3:}{0:~ }{3:}{0:~ }|
{1:[No Name] [+] }{3:[No Name] [+] [No Name] [+] }|
hello |
{0:~ }|
@ -269,12 +269,12 @@ describe('Screen', function()
command('tabprevious')
screen:expect([[
{2: }{6:4}{2:+ [No Name] }{4: + [No Name] }{3: }{4:X}|
hell^o {3:|}hello {3:|}hello |
{0:~ }{3:|}{0:~ }{3:|}{0:~ }|
{0:~ }{3:|}{0:~ }{3:|}{0:~ }|
{0:~ }{3:|}{0:~ }{3:|}{0:~ }|
{0:~ }{3:|}{0:~ }{3:|}{0:~ }|
{0:~ }{3:|}{0:~ }{3:|}{0:~ }|
hell^o {3:}hello {3:}hello |
{0:~ }{3:}{0:~ }{3:}{0:~ }|
{0:~ }{3:}{0:~ }{3:}{0:~ }|
{0:~ }{3:}{0:~ }{3:}{0:~ }|
{0:~ }{3:}{0:~ }{3:}{0:~ }|
{0:~ }{3:}{0:~ }{3:}{0:~ }|
{1:[No Name] [+] }{3:[No Name] [+] [No Name] [+] }|
hello |
{0:~ }|
@ -398,12 +398,12 @@ describe('Screen', function()
command('vsp')
command('vsp')
screen:expect([[
and {3:|}and {3:|}and |
clearing {3:|}clearing {3:|}clearing |
in {3:|}in {3:|}in |
split {3:|}split {3:|}split |
windows {3:|}windows {3:|}windows |
^ {3:|} {3:|} |
and {3:}and {3:}and |
clearing {3:}clearing {3:}clearing |
in {3:}in {3:}in |
split {3:}split {3:}split |
windows {3:}windows {3:}windows |
^ {3:} {3:} |
{1:[No Name] [+] }{3:[No Name] [+] [No Name] [+] }|
clearing |
in |
@ -418,12 +418,12 @@ describe('Screen', function()
it('only affects the current scroll region', function()
feed('6k')
screen:expect([[
^scrolling {3:|}and {3:|}and |
and {3:|}clearing {3:|}clearing |
clearing {3:|}in {3:|}in |
in {3:|}split {3:|}split |
split {3:|}windows {3:|}windows |
windows {3:|} {3:|} |
^scrolling {3:}and {3:}and |
and {3:}clearing {3:}clearing |
clearing {3:}in {3:}in |
in {3:}split {3:}split |
split {3:}windows {3:}windows |
windows {3:} {3:} |
{1:[No Name] [+] }{3:[No Name] [+] [No Name] [+] }|
clearing |
in |
@ -435,12 +435,12 @@ describe('Screen', function()
]])
feed('<c-w>l')
screen:expect([[
scrolling {3:|}and {3:|}and |
and {3:|}clearing {3:|}clearing |
clearing {3:|}in {3:|}in |
in {3:|}split {3:|}split |
split {3:|}windows {3:|}windows |
windows {3:|}^ {3:|} |
scrolling {3:}and {3:}and |
and {3:}clearing {3:}clearing |
clearing {3:}in {3:}in |
in {3:}split {3:}split |
split {3:}windows {3:}windows |
windows {3:}^ {3:} |
{3:[No Name] [+] }{1:[No Name] [+] }{3:<Name] [+] }|
clearing |
in |
@ -452,12 +452,12 @@ describe('Screen', function()
]])
feed('gg')
screen:expect([[
scrolling {3:|}^Inserting {3:|}and |
and {3:|}text {3:|}clearing |
clearing {3:|}with {3:|}in |
in {3:|}many {3:|}split |
split {3:|}lines {3:|}windows |
windows {3:|}to {3:|} |
scrolling {3:}^Inserting {3:}and |
and {3:}text {3:}clearing |
clearing {3:}with {3:}in |
in {3:}many {3:}split |
split {3:}lines {3:}windows |
windows {3:}to {3:} |
{3:[No Name] [+] }{1:[No Name] [+] }{3:<Name] [+] }|
clearing |
in |
@ -469,12 +469,12 @@ describe('Screen', function()
]])
feed('7j')
screen:expect([[
scrolling {3:|}with {3:|}and |
and {3:|}many {3:|}clearing |
clearing {3:|}lines {3:|}in |
in {3:|}to {3:|}split |
split {3:|}test {3:|}windows |
windows {3:|}^scrolling {3:|} |
scrolling {3:}with {3:}and |
and {3:}many {3:}clearing |
clearing {3:}lines {3:}in |
in {3:}to {3:}split |
split {3:}test {3:}windows |
windows {3:}^scrolling {3:} |
{3:[No Name] [+] }{1:[No Name] [+] }{3:<Name] [+] }|
clearing |
in |
@ -486,12 +486,12 @@ describe('Screen', function()
]])
feed('2j')
screen:expect([[
scrolling {3:|}lines {3:|}and |
and {3:|}to {3:|}clearing |
clearing {3:|}test {3:|}in |
in {3:|}scrolling {3:|}split |
split {3:|}and {3:|}windows |
windows {3:|}^clearing {3:|} |
scrolling {3:}lines {3:}and |
and {3:}to {3:}clearing |
clearing {3:}test {3:}in |
in {3:}scrolling {3:}split |
split {3:}and {3:}windows |
windows {3:}^clearing {3:} |
{3:[No Name] [+] }{1:[No Name] [+] }{3:<Name] [+] }|
clearing |
in |
@ -503,12 +503,12 @@ describe('Screen', function()
]])
feed('5k')
screen:expect([[
scrolling {3:|}^lines {3:|}and |
and {3:|}to {3:|}clearing |
clearing {3:|}test {3:|}in |
in {3:|}scrolling {3:|}split |
split {3:|}and {3:|}windows |
windows {3:|}clearing {3:|} |
scrolling {3:}^lines {3:}and |
and {3:}to {3:}clearing |
clearing {3:}test {3:}in |
in {3:}scrolling {3:}split |
split {3:}and {3:}windows |
windows {3:}clearing {3:} |
{3:[No Name] [+] }{1:[No Name] [+] }{3:<Name] [+] }|
clearing |
in |
@ -520,12 +520,12 @@ describe('Screen', function()
]])
feed('k')
screen:expect([[
scrolling {3:|}^many {3:|}and |
and {3:|}lines {3:|}clearing |
clearing {3:|}to {3:|}in |
in {3:|}test {3:|}split |
split {3:|}scrolling {3:|}windows |
windows {3:|}and {3:|} |
scrolling {3:}^many {3:}and |
and {3:}lines {3:}clearing |
clearing {3:}to {3:}in |
in {3:}test {3:}split |
split {3:}scrolling {3:}windows |
windows {3:}and {3:} |
{3:[No Name] [+] }{1:[No Name] [+] }{3:<Name] [+] }|
clearing |
in |