mirror of
https://github.com/osyo-manga/vim-brightest.git
synced 2025-11-08 11:33:54 -05:00
Fix no highlight BrightestCursorLineBg when nocursorline.
This commit is contained in:
@@ -2,7 +2,8 @@ scriptencoding utf-8
|
|||||||
let s:save_cpo = &cpo
|
let s:save_cpo = &cpo
|
||||||
set cpo&vim
|
set cpo&vim
|
||||||
|
|
||||||
let s:V = vital#of("brightest")
|
let s:V = vital#of("vital")
|
||||||
|
" let s:V = vital#of("brightest")
|
||||||
let s:Prelude = s:V.import("Prelude")
|
let s:Prelude = s:V.import("Prelude")
|
||||||
let s:Buffer = s:V.import("Coaster.Buffer")
|
let s:Buffer = s:V.import("Coaster.Buffer")
|
||||||
let s:Highlight = s:V.import("Coaster.Highlight")
|
let s:Highlight = s:V.import("Coaster.Highlight")
|
||||||
@@ -75,7 +76,11 @@ function! s:single_word(pattern, highlight, cursorline)
|
|||||||
call brightest#define_cursorline_highlight_group(a:highlight.group)
|
call brightest#define_cursorline_highlight_group(a:highlight.group)
|
||||||
endif
|
endif
|
||||||
call s:highlight("cursor_word", pattern, a:highlight)
|
call s:highlight("cursor_word", pattern, a:highlight)
|
||||||
call s:highlight("cursor_line", '\%' . line('.') . 'l' . pattern, a:cursorline)
|
|
||||||
|
" nocursorline の場合、BrightestCursorLineBg でハイライトしない
|
||||||
|
if !(a:cursorline.group ==# "BrightestCursorLineBg" && &cursorline == 0)
|
||||||
|
call s:highlight("cursor_line", '\%' . line('.') . 'l' . pattern, a:cursorline)
|
||||||
|
endif
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -94,6 +94,9 @@ g:brightest#highlight_in_cursorline *g:brightest#highlight_in_cursorline*
|
|||||||
NOTE:これの |brightest-highlight-group| に |BrightestCursorLineBg|
|
NOTE:これの |brightest-highlight-group| に |BrightestCursorLineBg|
|
||||||
を設定すると 'cursorline' がオンの場合にハイライトの背景が 'cursorline'
|
を設定すると 'cursorline' がオンの場合にハイライトの背景が 'cursorline'
|
||||||
と同じになります。
|
と同じになります。
|
||||||
|
また、この時に 'cursorline' を無効にすると
|
||||||
|
|g:brightest#highlight_in_cursorline| のハイライトは反映されなくなりま
|
||||||
|
す。
|
||||||
Example: >
|
Example: >
|
||||||
" カーソル行のハイライトを 'cursorline' のハイライトの背景と同じにする
|
" カーソル行のハイライトを 'cursorline' のハイライトの背景と同じにする
|
||||||
let g:brightest#highlight_in_cursorline = {
|
let g:brightest#highlight_in_cursorline = {
|
||||||
@@ -109,6 +112,7 @@ b:brightest_highlight_in_cursorline *b:brightest_highlight_in_cursorline*
|
|||||||
g:brightest#ignore_syntax_list *g:brightest#ignore_syntax_list*
|
g:brightest#ignore_syntax_list *g:brightest#ignore_syntax_list*
|
||||||
ハイライトを行わないシンタックス名のリストです。
|
ハイライトを行わないシンタックス名のリストです。
|
||||||
ここで設定したシンタックス上にカーソルがある場合はハイライトしません。
|
ここで設定したシンタックス上にカーソルがある場合はハイライトしません。
|
||||||
|
NOTE:|g:brightest#pattern|を設定していない場合、カーソル上以外の単語がハイライトされるのでこの機能が正しく動作しない可能性があります。
|
||||||
Default: >
|
Default: >
|
||||||
let g:brightest#ignore_syntax_list = []
|
let g:brightest#ignore_syntax_list = []
|
||||||
<
|
<
|
||||||
|
|||||||
Reference in New Issue
Block a user