diff --git a/CHANGELOG.md b/CHANGELOG.md index 49c42c96..98c7e911 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), - The key `` has been renamed to `` for `map` keybindings (#2286). - `.Stat.DirSize` and `.Stat.DirCount` in the ruler file no longer have a pointer type, and will be set to `-1` instead of `nil` if the corresponding value cannot be determined (#2397). - `setlocal` commands no longer support the ability to specify recursive directories (#2415). For use cases where `setlocal` should apply to a directory based on some condition, it is recommended to script this inside the `on-load` hook command. +- The `rulerfmt` and `statfmt` options are now marked as deprecated in favor of using the ruler file (configured using the `rulerfile` option), and will be removed in a future release (#2477). ### Added diff --git a/eval.go b/eval.go index da4bf9a1..51b0e84b 100644 --- a/eval.go +++ b/eval.go @@ -361,6 +361,7 @@ func (e *setExpr) eval(app *app, _ []string) { gOpts.rulerfile = replaceTilde(e.val) app.ui.ruler, app.ui.rulerErr = parseRuler(gOpts.rulerfile) case "rulerfmt": + app.ui.echoerr("option 'rulerfmt' is deprecated and will be replaced by the 'rulerfile' option") gOpts.rulerfmt = e.val case "scrolloff": n, err := strconv.Atoi(e.val) @@ -418,6 +419,7 @@ func (e *setExpr) eval(app *app, _ []string) { gOpts.sortby = method app.nav.sort() case "statfmt": + app.ui.echoerr("option 'statfmt' is deprecated and will be replaced by the 'rulerfile' option") gOpts.statfmt = e.val case "tabstop": n, err := strconv.Atoi(e.val) diff --git a/ui.go b/ui.go index 441042a3..496ecf34 100644 --- a/ui.go +++ b/ui.go @@ -694,6 +694,7 @@ func (ui *ui) drawPromptLine(nav *nav) { ui.promptWin.print(ui.screen, 0, 0, st, prompt) } +// Deprecated: Only called by drawRuler, which will eventually be replaced by drawRulerFile func formatRulerOpt(name, val string) string { // handle escape character so it doesn't mess up the ruler val = strings.ReplaceAll(val, "\033", "\033[7m\\033\033[0m") @@ -706,6 +707,7 @@ func formatRulerOpt(name, val string) string { return val } +// Deprecated: Will eventually be replaced by drawRulerFile func (ui *ui) drawStat(nav *nav) { if ui.msg != "" { ui.msgWin.print(ui.screen, 0, 0, tcell.StyleDefault, ui.msg) @@ -756,6 +758,7 @@ func (ui *ui) drawStat(nav *nav) { ui.msgWin.print(ui.screen, 0, 0, tcell.StyleDefault, fileInfo.String()) } +// Deprecated: Will eventually be replaced by drawRulerFile func (ui *ui) drawRuler(nav *nav) { st := tcell.StyleDefault