Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix display of special characters in finder popups #4215

Merged
merged 1 commit into from
Jan 14, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions autoload/youcompleteme/finder.vim
Original file line number Diff line number Diff line change
Expand Up @@ -499,7 +499,7 @@ function! s:RedrawFinderPopup() abort
\ .. line_num
let path_includes_line = 1

let spaces = available_width - len( desc ) - len( path )
let spaces = available_width - strdisplaywidth( desc ) - strdisplaywidth( path )
let spacing = 4
if spaces < spacing
let spaces = spacing
Expand All @@ -524,16 +524,16 @@ function! s:RedrawFinderPopup() abort
if len( path ) > 0
if path_includes_line
let props += [
\ { 'col': available_width - len( path ) + 1,
\ { 'col': len( desc ) + spaces + 1,
\ 'length': len( path ) - len( line_num ),
\ 'type': 'YCM-symbol-file' },
\ { 'col': available_width - len( line_num ) + 1,
\ { 'col': len( desc ) + spaces + 1 + len( path ) - len( line_num ),
\ 'length': len( line_num ),
\ 'type': 'YCM-symbol-line-num' },
\ ]
else
let props += [
\ { 'col': available_width - len( path ) + 1,
\ { 'col': len( desc ) + spaces + 1,
\ 'length': len( path ),
\ 'type': 'YCM-symbol-file' },
\ ]
Expand Down