Skip to content

Commit ce3e8bd

Browse files
authored
Merge pull request #2900 from zhengkai/master
chore: godoc popup border style
2 parents 9fa8d1e + 0f33ac5 commit ce3e8bd

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

autoload/go/doc.vim

+8-2
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
let s:cpo_save = &cpo
77
set cpo&vim
88

9+
scriptencoding utf-8
10+
911
let s:buf_nr = -1
1012

1113
function! go#doc#OpenBrowser(...) abort
@@ -61,10 +63,14 @@ function! s:GodocView(newposition, position, content) abort
6163
if exists('*popup_atcursor') && exists('*popup_clear')
6264
call popup_clear()
6365

66+
let borderchars = ['-', '|', '-', '|', '+', '+', '+', '+']
67+
if &encoding == "utf-8"
68+
let borderchars = ['', '', '', '', '', '', '', '']
69+
endif
6470
call popup_atcursor(split(a:content, '\n'), {
6571
\ 'padding': [1, 1, 1, 1],
66-
\ 'borderchars': ['-','|','-','|','+','+','+','+'],
67-
\ "border": [1, 1, 1, 1],
72+
\ 'borderchars': borderchars,
73+
\ 'border': [1, 1, 1, 1],
6874
\ })
6975
elseif has('nvim') && exists('*nvim_open_win')
7076
let lines = split(a:content, '\n')

doc/vim-go.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1486,7 +1486,7 @@ other packages. Valid options are `gopls` and `guru`. By default it's `gopls`.
14861486
<
14871487
*'g:go_implements_mode'*
14881488

1489-
Use this option to define the command to be used for |:GoImplements|.
1489+
Use this option to define the command to be used for |:GoImplements|.
14901490
The Implements feature in gopls is still new and being worked upon.
14911491
Valid options are `gopls` and `guru`. By default it's `guru`.
14921492
>

0 commit comments

Comments
 (0)