File tree Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -152,6 +152,8 @@ function! startify#insane_in_the_membrane(on_vimenter) abort
152152
153153 setlocal nomodifiable nomodified
154154
155+ call s: hide_endofbuffer_markers ()
156+
155157 call s: set_mappings ()
156158 call cursor (b: startify .firstline, 5 )
157159 autocmd startify CursorMoved <buffer> call s: set_cursor ()
@@ -1111,6 +1113,24 @@ function s:transform(absolute_path)
11111113 return ' '
11121114endfunction
11131115
1116+ " Function: s:hide_endofbuffer_markers {{{1
1117+ " Use the bg color of Normal to set the fg color of EndOfBuffer, effectively
1118+ " hiding it.
1119+ function ! s: hide_endofbuffer_markers ()
1120+ if ! exists (' +winhl' )
1121+ return
1122+ endif
1123+ let val = synIDattr (hlID (' Normal' ), ' bg' )
1124+ if empty (val)
1125+ return
1126+ elseif val = ~ ' ^\d*$'
1127+ execute ' highlight StartifyEndOfBuffer ctermfg=' . val
1128+ else
1129+ execute ' highlight StartifyEndOfBuffer guifg=' . val
1130+ endif
1131+ setlocal winhighlight= EndOfBuffer :StartifyEndOfBuffer
1132+ endfunction
1133+
11141134" Function: s:warn {{{1
11151135function ! s: warn (msg) abort
11161136 echohl WarningMsg
You can’t perform that action at this time.
0 commit comments