3 Commits

Author SHA1 Message Date
Christian Brabandt
c7704c6bc7 init: use a minimum of 2 columns for the current line number
Some checks failed
CI / Test (v7.4) (push) Has been cancelled
CI / Test (v8.0.0000) (push) Has been cancelled
CI / Test (v8.1.0000) (push) Has been cancelled
CI / Test (v8.2.0000) (push) Has been cancelled
CI / Test (v8.2.1000) (push) Has been cancelled
CI / Test (v9.0.0000) (push) Has been cancelled
CI / Test (v9.1.0000) (push) Has been cancelled
reviewdog / runner / vint (push) Has been cancelled
fixes: #2699

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-04-08 13:27:11 +02:00
ark231
7c7391a1fc fix line number of nvimlsp being off by one (#2713)
The line number vim.diagnostic.get() returns is 0-indexed,
but displayed line numbers are 1-indexed
2025-04-08 13:17:57 +02:00
Christian Brabandt
9884c07966 whitespace: U+2632 changed width to double-width
Whitespace Character U+2632 changed to double-width with Unicode release
16 (Vim patch v9.1.736). This causes issues with the statusline like
adding wrapping.
So let's mark that character back as single width, since that is what
most underlying libraries seem to expect.

closes: #2715
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-04-08 10:20:16 +02:00
2 changed files with 7 additions and 2 deletions

View File

@@ -47,7 +47,7 @@ endfunction
function! s:airline_nvimlsp_get_line_number(cnt, type) abort
let severity = a:type == 'Warning' ? 'Warn' : a:type
let num = v:lua.vim.diagnostic.get(0, { 'severity': severity })[0].lnum
let num = v:lua.vim.diagnostic.get(0, { 'severity': severity })[0].lnum + 1
let l:open_lnum_symbol =
\ get(g:, 'airline#extensions#nvimlsp#open_lnum_symbol', '(L')

View File

@@ -138,6 +138,11 @@ function! airline#init#bootstrap()
\ 'crypt': nr2char(0x1F512),
\ }, 'keep')
" Note: If "\u2046" (Ɇ) does not show up, try to use "\u2204" (∄)
if exists("*setcellwidths")
" whitespace char 0x2632 changed to double-width in Unicode 16,
" mark it single width again
call setcellwidths([[0x2632, 0x2632, 1]])
endif
elseif &encoding==?'utf-8' && !get(g:, "airline_symbols_ascii", 0)
" Symbols for Unicode terminals
call s:check_defined('g:airline_left_sep', "")
@@ -195,7 +200,7 @@ function! airline#init#bootstrap()
endif
call airline#parts#define_raw('path', '%F%m')
call airline#parts#define('linenr', {
\ 'raw': '%{g:airline_symbols.linenr}%l',
\ 'raw': '%{g:airline_symbols.linenr}%2l',
\ 'accent': 'bold'})
call airline#parts#define('maxlinenr', {
\ 'raw': '/%L%{g:airline_symbols.maxlinenr}',