Skip to content
Myr

Do not allow gutter characters with width other than 1

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Junegunn Choi · committed by Junegunn Choi · parent 548061d · Browse files · 1 file+3 added−10 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+3 added−10 removed

  • other:+3 added−10 removed

1 file+3 added−10 removed

modified:src/options.go+3 added-10 removed
3410 unmodified lines
3411 return err3412 }3413 }34143415 if opts.Gutter != nil {3416 if err := validateSign(*opts.Gutter, "gutter", 1); err != nil {3417 return err3418 }3415 if opts.Gutter != nil && uniseg.StringWidth(*opts.Gutter) != 1 ||3416 opts.GutterRaw != nil && uniseg.StringWidth(*opts.GutterRaw) != 1 {3417 return errors.New("gutter display width should be 1")3418 }34193421 if opts.GutterRaw != nil {3422 if err := validateSign(*opts.GutterRaw, "gutter", 1); err != nil {3423 return err3424 }3425 }34263420 if opts.Scrollbar != nil {3421 runes := []rune(*opts.Scrollbar)3422 if len(runes) > 2 {3423 return errors.New("--scrollbar should be given one or two characters")
359 unmodified lines