From 1552d3e8ec7a25aa72bd0dfa5a8344d9c132a7c5 Mon Sep 17 00:00:00 2001 From: Josh Dick Date: Tue, 15 Aug 2017 19:19:11 -0400 Subject: [PATCH] In diff mode, for cursorline, use underline styling instead of background styling to improve readability. Fixes #107. --- colors/onedark.vim | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/colors/onedark.vim b/colors/onedark.vim index b870815..7242399 100644 --- a/colors/onedark.vim +++ b/colors/onedark.vim @@ -171,13 +171,17 @@ call s:h("Todo", { "fg": s:purple }) " anything that needs extra attention; most " }}} " Highlighting Groups (descriptions and ordering from `:h highlight-groups`) {{{ - call s:h("ColorColumn", { "bg": s:cursor_grey }) " used for the columns set with 'colorcolumn' call s:h("Conceal", {}) " placeholder characters substituted for concealed text (see 'conceallevel') call s:h("Cursor", { "fg": s:black, "bg": s:blue }) " the character under the cursor call s:h("CursorIM", {}) " like Cursor, but used when in IME mode call s:h("CursorColumn", { "bg": s:cursor_grey }) " the screen column that the cursor is in when 'cursorcolumn' is set -call s:h("CursorLine", { "bg": s:cursor_grey }) " the screen line that the cursor is in when 'cursorline' is set +if &diff + " Don't change the background color in diff mode + call s:h("CursorLine", { "gui": "underline" }) " the screen line that the cursor is in when 'cursorline' is set +else + call s:h("CursorLine", { "bg": s:cursor_grey }) " the screen line that the cursor is in when 'cursorline' is set +endif call s:h("Directory", { "fg": s:blue }) " directory names (and other special names in listings) call s:h("DiffAdd", { "bg": s:green, "fg": s:black }) " diff mode: Added line call s:h("DiffChange", { "bg": s:yellow, "fg": s:black }) " diff mode: Changed line