diff options
| author | Junegunn Choi <junegunn.c@gmail.com> | 2025-09-30 17:44:29 +0900 |
|---|---|---|
| committer | Junegunn Choi <junegunn.c@gmail.com> | 2025-10-09 00:17:00 +0900 |
| commit | ce2200e9080d84a0e658fd1523f4fac619b58da4 (patch) | |
| tree | aba92b1eecb7e92427798f6982059c066017d564 /src | |
| parent | 548061dbdeabf75314bdce3c2caa727149f28a68 (diff) | |
| download | fzf-ce2200e9080d84a0e658fd1523f4fac619b58da4.tar.gz | |
Do not allow gutter characters with width other than 1
Diffstat (limited to 'src')
| -rw-r--r-- | src/options.go | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/src/options.go b/src/options.go index 7ed6c77d..d3be6821 100644 --- a/src/options.go +++ b/src/options.go @@ -3412,16 +3412,9 @@ func validateOptions(opts *Options) error { } } - if opts.Gutter != nil { - if err := validateSign(*opts.Gutter, "gutter", 1); err != nil { - return err - } - } - - if opts.GutterRaw != nil { - if err := validateSign(*opts.GutterRaw, "gutter", 1); err != nil { - return err - } + if opts.Gutter != nil && uniseg.StringWidth(*opts.Gutter) != 1 || + opts.GutterRaw != nil && uniseg.StringWidth(*opts.GutterRaw) != 1 { + return errors.New("gutter display width should be 1") } if opts.Scrollbar != nil { |
