Skip to content

Commit

Permalink
Remove cursorfmt option to cursoractivefmt
Browse files Browse the repository at this point in the history
This seems appropriate after introducing `cursorparentfmt`
  • Loading branch information
ilyagr committed Feb 12, 2023
1 parent e5785aa commit 8ef530f
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 17 deletions.
2 changes: 1 addition & 1 deletion complete.go
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ var (
"autoquit",
"noautoquit",
"autoquit!",
"cursorfmt",
"cursoractivefmt",
"cursorparentfmt",
"cursorpreviewfmt",
"dircache",
Expand Down
6 changes: 3 additions & 3 deletions doc.go
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ The following options can be used to customize the behavior of lf:
anchorfind bool (default on)
autoquit bool (default off)
cleaner string (default '')
cursorfmt string (default "\033[7m")
cursoractivefmt string (default "\033[7m")
cursorparentfmt string (default "\033[7m")
cursorpreviewfmt string (default "\033[4m")
dircache bool (default on)
Expand Down Expand Up @@ -609,12 +609,12 @@ This file is called if previewing is enabled, the previewer is set, and the prev
Five arguments are passed to the file, (1) current file name, (2) width, (3) height, (4) horizontal position, and (5) vertical position of preview pane respectively.
Preview clearing is disabled when the value of this option is left empty.
cursorfmt string (default "\033[7m")
cursoractivefmt string (default "\033[7m")
cursorparentfmt string (default "\033[7m")
cursorpreviewfmt string (default "\033[4m")
Format strings for highlighting the cursor.
`cursorfmt` applies in the current directory pane,
`cursoractivefmt` applies in the current directory pane,
`cursorparentfmt` applies in panes that show parents of the current directory,
and `cursorpreviewfmt` applies in panes that preview directories.
Expand Down
10 changes: 5 additions & 5 deletions docstring.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions eval.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ func (e *setExpr) eval(app *app, args []string) {
gOpts.autoquit = true
case "noautoquit":
gOpts.autoquit = false
case "cursorfmt":
gOpts.cursorfmt = e.val
case "cursoractivefmt":
gOpts.cursoractivefmt = e.val
case "cursorparentfmt":
gOpts.cursorparentfmt = e.val
case "cursorpreviewfmt":
Expand Down
6 changes: 3 additions & 3 deletions lf.1
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ The following options can be used to customize the behavior of lf:
anchorfind bool (default on)
autoquit bool (default off)
cleaner string (default '')
cursorfmt string (default "\e033[7m")
cursoractivefmt string (default "\e033[7m")
cursorparentfmt string (default "\e033[7m")
cursorpreviewfmt string (default "\e033[4m")
dircache bool (default on)
Expand Down Expand Up @@ -751,12 +751,12 @@ Automatically quit server when there are no clients left connected.
Set the path of a cleaner file. The file should be executable. This file is called if previewing is enabled, the previewer is set, and the previously selected file had its preview cache disabled. Five arguments are passed to the file, (1) current file name, (2) width, (3) height, (4) horizontal position, and (5) vertical position of preview pane respectively. Preview clearing is disabled when the value of this option is left empty.
.PP
.EX
cursorfmt string (default "\e033[7m")
cursoractivefmt string (default "\e033[7m")
cursorparentfmt string (default "\e033[7m")
cursorpreviewfmt string (default "\e033[4m")
.EE
.PP
Format strings for highlighting the cursor. `cursorfmt` applies in the current directory pane, `cursorparentfmt` applies in panes that show parents of the current directory, and `cursorpreviewfmt` applies in panes that preview directories.
Format strings for highlighting the cursor. `cursoractivefmt` applies in the current directory pane, `cursorparentfmt` applies in panes that show parents of the current directory, and `cursorpreviewfmt` applies in panes that preview directories.
.PP
The default is to make the active cursor and the parent directory cursor inverted. The preview cursor is underlined.
.PP
Expand Down
4 changes: 2 additions & 2 deletions opts.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ type sortType struct {
var gOpts struct {
anchorfind bool
autoquit bool
cursorfmt string
cursoractivefmt string
cursorparentfmt string
cursorpreviewfmt string
dircache bool
Expand Down Expand Up @@ -92,7 +92,7 @@ func init() {
gOpts.dironly = false
gOpts.dirpreviews = false
gOpts.drawbox = false
gOpts.cursorfmt = "\033[7m"
gOpts.cursoractivefmt = "\033[7m"
gOpts.cursorparentfmt = "\033[7m"
gOpts.cursorpreviewfmt = "\033[4m"
gOpts.globsearch = false
Expand Down
2 changes: 1 addition & 1 deletion ui.go
Original file line number Diff line number Diff line change
Expand Up @@ -485,7 +485,7 @@ func (win *win) printDir(screen tcell.Screen, dir *dir, context *dirContext, dir
if i == dir.pos {
switch dirStyle.role {
case Active:
ce = gOpts.cursorfmt
ce = gOpts.cursoractivefmt
case Parent:
ce = gOpts.cursorparentfmt
case Preview:
Expand Down

0 comments on commit 8ef530f

Please sign in to comment.