Skip to content

Commit

Permalink
vim-patch:8.1.1564: sign column takes up space
Browse files Browse the repository at this point in the history
Problem:    Sign column takes up space.  (Adam Stankiewicz)
Solution:   Optionally put signs in the number column. (Yegappan Lakshmanan,
            closes vim/vim#4555, closes vim/vim#4515)
vim/vim@394c5d8
  • Loading branch information
Shougo committed Jul 14, 2020
1 parent fb90660 commit c872e35
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/nvim/option.c
Original file line number Diff line number Diff line change
Expand Up @@ -7404,6 +7404,7 @@ int win_signcol_count(win_T *wp)
int maximum = 1, needed_signcols;
const char *scl = (const char *)wp->w_p_scl;

// Note: It checks "no" or "number" in 'signcolumn' option
if (*scl == 'n'
&& (*(scl + 1) == 'o' || (*(scl + 1) == 'u'
&& (wp->w_p_nu || wp->w_p_rnu)))) {
Expand Down
2 changes: 1 addition & 1 deletion src/nvim/screen.c
Original file line number Diff line number Diff line change
Expand Up @@ -4477,7 +4477,7 @@ void screen_adjust_grid(ScreenGrid **grid, int *row_off, int *col_off)
// If 'nrcol' is TRUE, the sign is going to be displayed in the number column.
// Otherwise the sign is going to be displayed in the sign column.
static void get_sign_display_info(
int nrcol,
bool nrcol,
win_T *wp,
linenr_T lnum,
int row,
Expand Down
1 change: 1 addition & 0 deletions src/nvim/testdir/test_signs.vim
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ endif

source screendump.vim

" Note: In neovim, swapfile feature must be disabled
set noswapfile

func Test_sign()
Expand Down

0 comments on commit c872e35

Please sign in to comment.