Mercurial > vim
comparison src/option.c @ 17129:4fb68abc770f v8.1.1564
patch 8.1.1564: sign column takes up space
commit https://github.com/vim/vim/commit/394c5d8870b15150fc91a4c058dc571fd5eaa97e
Author: Bram Moolenaar <Bram@vim.org>
Date: Mon Jun 17 21:48:05 2019 +0200
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 #4555, closes #4515)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Mon, 17 Jun 2019 22:00:09 +0200 |
parents | 1c2d05cb4d1d |
children | 210937723567 |
comparison
equal
deleted
inserted
replaced
17128:ba266d95db3f | 17129:4fb68abc770f |
---|---|
3229 #endif | 3229 #endif |
3230 #ifdef FEAT_INS_EXPAND | 3230 #ifdef FEAT_INS_EXPAND |
3231 static char *(p_cot_values[]) = {"menu", "menuone", "longest", "preview", "noinsert", "noselect", NULL}; | 3231 static char *(p_cot_values[]) = {"menu", "menuone", "longest", "preview", "noinsert", "noselect", NULL}; |
3232 #endif | 3232 #endif |
3233 #ifdef FEAT_SIGNS | 3233 #ifdef FEAT_SIGNS |
3234 static char *(p_scl_values[]) = {"yes", "no", "auto", NULL}; | 3234 static char *(p_scl_values[]) = {"yes", "no", "auto", "number", NULL}; |
3235 #endif | 3235 #endif |
3236 #if defined(MSWIN) && defined(FEAT_TERMINAL) | 3236 #if defined(MSWIN) && defined(FEAT_TERMINAL) |
3237 static char *(p_twt_values[]) = {"winpty", "conpty", "", NULL}; | 3237 static char *(p_twt_values[]) = {"winpty", "conpty", "", NULL}; |
3238 #endif | 3238 #endif |
3239 | 3239 |
13554 * Return TRUE when window "wp" has a column to draw signs in. | 13554 * Return TRUE when window "wp" has a column to draw signs in. |
13555 */ | 13555 */ |
13556 int | 13556 int |
13557 signcolumn_on(win_T *wp) | 13557 signcolumn_on(win_T *wp) |
13558 { | 13558 { |
13559 // If 'signcolumn' is set to 'number', signs are displayed in the 'number' | |
13560 // column (if present). Otherwise signs are to be displayed in the sign | |
13561 // column. | |
13562 if (*wp->w_p_scl == 'n' && *(wp->w_p_scl + 1) == 'u') | |
13563 return wp->w_buffer->b_signlist != NULL && !wp->w_p_nu && !wp->w_p_rnu; | |
13564 | |
13559 if (*wp->w_p_scl == 'n') | 13565 if (*wp->w_p_scl == 'n') |
13560 return FALSE; | 13566 return FALSE; |
13561 if (*wp->w_p_scl == 'y') | 13567 if (*wp->w_p_scl == 'y') |
13562 return TRUE; | 13568 return TRUE; |
13563 return (wp->w_buffer->b_signlist != NULL | 13569 return (wp->w_buffer->b_signlist != NULL |