Skip to content

Commit

Permalink
Use reliable regexp character class for lower case
Browse files Browse the repository at this point in the history
It turns out [:lower:] does not always mean lower case (it depends
on 'ignorecase').  Sigh.
  • Loading branch information
airblade committed Apr 25, 2022
1 parent 774add0 commit 57000a7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions autoload/gitgutter/utility.vim
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ let s:set_path_handler = {}
function! s:set_path_handler.out(buffer, listing) abort
let listing = s:strip_trailing_new_line(a:listing)
let [status, path] = [listing[0], listing[2:]]
if status =~ '[[:lower:]]'
if status =~ '[a-z]'
call gitgutter#utility#setbufvar(a:buffer, 'path', -3)
else
call gitgutter#utility#setbufvar(a:buffer, 'path', path)
Expand Down Expand Up @@ -170,7 +170,7 @@ function! gitgutter#utility#set_repo_path(bufnr, continuation) abort

let listing = s:strip_trailing_new_line(listing)
let [status, path] = [listing[0], listing[2:]]
if status =~ '[[:lower:]]'
if status =~ '[a-z]'
call gitgutter#utility#setbufvar(a:bufnr, 'path', -3)
else
call gitgutter#utility#setbufvar(a:bufnr, 'path', path)
Expand Down

0 comments on commit 57000a7

Please sign in to comment.