1
0
forked from aniani/vim

runtime(defaults): Detect putty terminal and switch to dark background

Vim tries to determine the default background and checks for $TERM
and even checks for the "putty" value. But unfortunately, putty by
default uses "xterm" as $TERM value and as such Vim uses a "light"
background.

So use a TermResponse autocommand to set the background for putty back
to dark.

Note: this only works on non-tiny builds and when defaults.vim is in
use.

Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
Christian Brabandt
2024-10-27 21:33:09 +01:00
parent ce35ee8986
commit 2abec431e1
4 changed files with 24 additions and 6 deletions

View File

@@ -1701,6 +1701,8 @@ func Test_verbose_option()
CheckScreendump
let lines =<< trim [SCRIPT]
" clear the TermResponse autocommand from defaults.vim
au! vimStartup TermResponse
command DoSomething echo 'hello' |set ts=4 |let v = '123' |echo v
call feedkeys("\r", 't') " for the hit-enter prompt
set verbose=20