+27
-1
lines changedFilter options
+27
-1
lines changed Original file line number Diff line number Diff line change
@@ -2792,7 +2792,7 @@ static int win_line(win_T *wp, linenr_T lnum, int startrow, int endrow, bool noc
2792
2792
// in 'lnum', then display the sign instead of the line
2793
2793
// number.
2794
2794
if (*wp->w_p_scl == 'n' && *(wp->w_p_scl + 1) == 'u'
2795
-
&& num_signs > 0) {
2795
+
&& num_signs > 0 && sign_get_attr(SIGN_TEXT, sattrs, 0, 1)) {
2796
2796
int count = win_signcol_count(wp);
2797
2797
get_sign_display_info(true, wp, lnum, sattrs, row,
2798
2798
startrow, filler_lines, filler_todo, count,
Original file line number Diff line number Diff line change
@@ -526,6 +526,32 @@ describe('Signs', function()
526
526
]])
527
527
end)
528
528
529
+
it('shows the line number when signcolumn=number but no marks on a line have text', function()
530
+
feed('ia<cr>b<cr>c<cr><esc>')
531
+
command('set number signcolumn=number')
532
+
command('sign define pietSearch text=>> texthl=Search numhl=Error')
533
+
command('sign define pietError text= texthl=Search numhl=Error')
534
+
command('sign place 1 line=1 name=pietSearch buffer=1')
535
+
command('sign place 2 line=2 name=pietError buffer=1')
536
+
-- no signcolumn, line number for "a" is Search, for "b" is Error, for "c" is LineNr
537
+
screen:expect([[
538
+
{1: >> }a |
539
+
{8: 2 }b |
540
+
{6: 3 }c |
541
+
{6: 4 }^ |
542
+
{0:~ }|
543
+
{0:~ }|
544
+
{0:~ }|
545
+
{0:~ }|
546
+
{0:~ }|
547
+
{0:~ }|
548
+
{0:~ }|
549
+
{0:~ }|
550
+
{0:~ }|
551
+
|
552
+
]])
553
+
end)
554
+
529
555
it('can have 32bit sign IDs', function()
530
556
command('sign define piet text=>> texthl=Search')
531
557
command('sign place 100000 line=1 name=piet buffer=1')
You can’t perform that action at this time.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4