aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShougo Matsushita <Shougo.Matsu@gmail.com>2020-07-11 13:13:49 +0900
committerShougo Matsushita <Shougo.Matsu@gmail.com>2020-07-23 10:29:36 +0900
commit1647e0a5b306dc6767a5298c8a9281a0fc7ace14 (patch)
tree909f07cbed7b326e06fdf3fa3a7a50d12c2a387e
parent6b521ceeaf7dd3ad3169355c1c106139291e82e8 (diff)
downloadrneovim-1647e0a5b306dc6767a5298c8a9281a0fc7ace14.tar.gz
rneovim-1647e0a5b306dc6767a5298c8a9281a0fc7ace14.tar.bz2
rneovim-1647e0a5b306dc6767a5298c8a9281a0fc7ace14.zip
vim-patch:8.1.1564: sign column takes up space
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) https://github.com/vim/vim/commit/394c5d8870b15150fc91a4c058dc571fd5eaa97e
-rw-r--r--src/nvim/option.c1
-rw-r--r--src/nvim/screen.c2
-rw-r--r--src/nvim/testdir/test_signs.vim1
3 files changed, 3 insertions, 1 deletions
diff --git a/src/nvim/option.c b/src/nvim/option.c
index 97f31b4754..2862419177 100644
--- a/src/nvim/option.c
+++ b/src/nvim/option.c
@@ -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)))) {
diff --git a/src/nvim/screen.c b/src/nvim/screen.c
index fddcedf449..4ca2621b14 100644
--- a/src/nvim/screen.c
+++ b/src/nvim/screen.c
@@ -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,
diff --git a/src/nvim/testdir/test_signs.vim b/src/nvim/testdir/test_signs.vim
index 48a885c0a1..3dad290c94 100644
--- a/src/nvim/testdir/test_signs.vim
+++ b/src/nvim/testdir/test_signs.vim
@@ -6,6 +6,7 @@ endif
source screendump.vim
+" Note: In neovim, swapfile feature must be disabled
set noswapfile
func Test_sign()