m/fzf
1
0
mirror of https://github.com/junegunn/fzf.git synced 2025-11-13 22:03:47 -05:00

Better support for Windows terminals

* Default border style on Windows is changed to `sharp` because some
  Windows terminals are not capable of displaying `rounded` border
  characters correctly.
* If your terminal emulator renders each box-drawing character with
  2 columns, set `RUNEWIDTH_EASTASIAN` environment variable to `1`.
This commit is contained in:
Junegunn Choi
2023-01-16 01:22:02 +09:00
parent 1c83b39691
commit 0c5956c43c
8 changed files with 66 additions and 30 deletions

View File

@@ -314,7 +314,7 @@ type Options struct {
}
func defaultPreviewOpts(command string) previewOpts {
return previewOpts{command, posRight, sizeSpec{50, true}, "", false, false, false, false, tui.BorderRounded, 0, 0, nil}
return previewOpts{command, posRight, sizeSpec{50, true}, "", false, false, false, false, tui.DefaultBorderShape, 0, 0, nil}
}
func defaultOptions() *Options {
@@ -543,7 +543,7 @@ func parseBorder(str string, optional bool) tui.BorderShape {
return tui.BorderNone
default:
if optional && str == "" {
return tui.BorderRounded
return tui.DefaultBorderShape
}
errorExit("invalid border style (expected: rounded|sharp|bold|double|horizontal|vertical|top|bottom|left|right|none)")
}