Skip to content

Commit

Permalink
use ==# instead of == for string comparison when sanitizing history
Browse files Browse the repository at this point in the history
  • Loading branch information
satorunooshie committed Apr 12, 2024
1 parent 20d5ee8 commit d324025
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .vimrc
Original file line number Diff line number Diff line change
Expand Up @@ -628,8 +628,8 @@ autocmd MyVimrcCmd FileType proto setlocal shiftwidth=2 tabstop=2 makeprg=buf
# Sanitize the command line history. #{{{
def SanitizeHistory(): void
var cmd = histget(":", -1)
if cmd == "x" || cmd == "xa" || cmd == "e!" ||
cmd == "vs" || cmd =~# "^w\\?q\\?a\\?!\\?$"
if cmd ==# "x" || cmd ==# "xa" || cmd ==# "e!" ||
cmd ==# "vs" || cmd =~# "^w\\?q\\?a\\?!\\?$"
histdel(":", -1)
endif
enddef
Expand Down

0 comments on commit d324025

Please sign in to comment.