Commit Graph
284 Commits
Author SHA1 Message Date
Carlo Teubner fc4b3637bb Miscellaneous tweaks and fixes (#2223)
* Miscellaneous tweaks and fixes

Mostly these were found by running golangci-lint with a bunch of linters
(more than the default set) enabled.

* fmt.Fprint -> fmt.Fprintln where possible

* Remove "nolint:staticcheck" for now
2025-10-28 15:10:32 +11:00
Joe Lim b12cb33918 Prevent window height from being negative (#2232) 2025-10-27 20:31:00 +11:00
CatsDeservePets 765a331977 Explicitly hide mode in showbinds menu (#2228) 2025-10-26 21:55:14 +01:00
CatsDeservePets ff169a80b9 Hide mode when listing single-mode binds (#2226) 2025-10-26 09:43:04 +01:00
Joe Lim a7f7e84e81 Handle nav resizes (#2218)
* Handle nav resizes

* Update `CHANGELOG.md`
2025-10-21 21:46:19 +11:00
Joe LimandCatsDeservePets 7b6b6da100 Add ruler file for customizing the ruler (#2186)
* Add ruler file for customizing the ruler

* Update `CHANGELOG.md`

* Show ruler errors instead of logging them

* Allow multiple sections

* Show syntax errors for ruler file

* Add line percentage

* Add lower/upper functions

* Add back truncation

* Use fmt options

---------

Co-authored-by: CatsDeservePets <145048791+CatsDeservePets@users.noreply.github.com>
2025-10-21 20:04:05 +11:00
CatsDeservePets 06376f9089 Fix spacing for empty custom info (#2208) 2025-10-18 19:28:50 +02:00
CatsDeservePets 4bfd3c8ac5 Silence gopls hints (#2195) 2025-10-09 02:18:16 +02:00
Joe Lim 89ff7b0203 Implement smarter history navigation (#2161)
* Remove unnecessary space in history file

* Refactor history navigation

* Implement smarter history navigation

* Skip duplicate commands in history navigation

* Return to Normal mode if it started from there

* Reset history state when changing prompt

* Update documentation
2025-09-19 19:44:43 +10:00
Joe Lim 5e15655539 Prevent truncation from applying to file extension (#2159)
* Prevent truncation from applying to file extension

* Update documentation
2025-09-19 18:32:06 +10:00
Joe Lim 8dad85197f Remove padding for text previews (#2131)
* Remove offset for text previews

* Update `CHANGELOG.md`

* reword
2025-09-04 15:38:57 +10:00
Joe Lim 7297e4f522 Add options for customizing the appearance of the menu (#2123)
* Refactor for loop

* Save menu selection

* Add options to customize menu style

* Add documentation
2025-08-27 19:49:07 +10:00
Joe Lim f2d2bb0f2c Draw menu over sixel images if they overlap (#2122)
* Refactor menu drawing code

* Fix menu and sixel overlap
2025-08-27 17:51:47 +10:00
Joe Lim 8150586bc2 Clear error messages after a command runs successfully (#2117)
* Draw stat info on demand

* Remove loadfileinfo function

* Fix clearmsg bug when opening directories

* Move visual code
2025-08-26 17:48:15 +10:00
Joe Lim 8f97bf806a Add unit tests for escape sequence parse functions (#2116) 2025-08-26 14:49:33 +10:00
Joe Lim 13da770af6 Implement builtin support for sixel images, allow combining with text (#2109)
* Add function for reading lines in file

* Implement sixel drawing

* Remove sixel option

* Fix linting error
2025-08-25 22:19:14 +10:00
Joe Lim f716ce1b0f Show progress immediately when copying files (#2093) 2025-08-12 14:20:19 +10:00
Joe Lim edc5d977cd Replace save buffer with clipboard struct (#2082) 2025-08-07 19:27:17 +10:00
Joe Lim 42b36fd52c Improvements for command line completion (#2071)
- Refactor of the completion module, primarily to have the `match...` functions return the result for each possible match, so that they can be displayed when the user cycles through the completions using `cmd-menu-complete`/`cmd-menu-complete-back`
- Add support for completing list options (e.g. `set info user:group:size:time`)
- Provide different implementations for escaping/unescaping for `lfrc` command syntax, Unix and Windows. It is a bit hacky, but for now I want to keep `lf` as shell-agnostic as possible which means minimizing the logic based on `gOpts.shell`
- Fix alignment bug in the completion menu when displaying filenames with fullwidth characters
2025-08-07 15:14:25 +10:00
Joe Lim 0a05a7106d Dircounts should have a width of 5 when displaying (#2072) 2025-07-31 17:12:01 +10:00
Andrew VoynovandJoe Lim 23b30ae1ee Change file size units to IEC 80000-13:2025 (binary multiples) (#2062)
* Change file size units from SI to IEC 80000-13:2025

Increase left-padded (%S) file size string length to 5 characters

Co-authored-by: Joe Lim <50560759+joelim-work@users.noreply.github.com>

* Add note about used IEC units for file size in docs

---------

Co-authored-by: Joe Lim <50560759+joelim-work@users.noreply.github.com>
2025-07-26 19:03:13 +10:00
Joe Lim 5e24fd93d2 Ignore pasted input while in Normal mode (#2059) 2025-07-22 11:53:51 +10:00
Joe Lim 041dfcc073 Revert "Respect symlinks when tagging files (#1997)" (#2055)
This reverts commit fe3a97c5d0.
2025-07-20 19:21:13 +10:00
CatsDeservePets 87c994b9de Support btime in sortby and info (#2042)
* Add support for `btime` in `sortby` and `info`

* Update documentation

* Minor design improvements
2025-07-19 13:06:34 +10:00
CatsDeservePets cb8026d627 Add visual-mode (#2021)
- Add functionality for visually selecting files
- Add keymap for Visual mode, and supporting `nmap` and `vmap` commands
- Add mode column for `maps` command, also add `nmaps` and `vmaps` commands
- Add `visualfmt` option for configuring appearance for the visual selection
- Add `%m/%M` placeholders for displaying the mode
- Add marker indicating the number of visually selected files in the ruler
- Add `visual` as an identifier when exporting `lf_mode`
- Remove experimental `invert-below` command
2025-07-05 11:33:45 +10:00
Joe Lim 8c5648ab33 cleanup (#2013) 2025-06-20 19:29:43 +10:00
CatsDeservePetsandJoe Lim 17971fd66e Add addcustominfo command (#2012)
Co-authored-by: Joe Lim <50560759+joelim-work@users.noreply.github.com>
2025-06-20 18:02:09 +10:00
Joe Lim fe3a97c5d0 Respect symlinks when tagging files (#1997) 2025-05-30 15:15:30 +10:00
Joe Lim 4666a0b875 Simplify percentage calculation (#1987) 2025-05-12 19:29:00 +10:00
Joe Lim e7ea6c6d0d Add scroll percentage to rulerfmt option (#1985) 2025-05-12 14:28:26 +10:00
KuchteqandMariusz Kuchta 7a89808688 Make sixel output flicker free (#1943)
* Make sixel output flicker free

* Address pr comments

* Lock regions based on sixel dimensions

This fixes issues related to clearing the previous sixel data

* name changes and extra error handeling

* Apply force clearing changes and change log messages

* Delete missleading comment

* check pixel dimensions

* correct cell dimensions checking

* Add force clearing on image update

---------

Co-authored-by: Mariusz Kuchta <mariusz@kuchta.dev>
2025-04-28 12:26:27 +10:00
Joe Lim 0df0c0f5ff Simpler implementation of dirpreviews (#1958) 2025-04-10 15:34:13 +10:00
Joe Lim 3d5a418c6c Use Screen.Clear for clearing the screen (#1957) 2025-04-09 21:51:05 +10:00
Joe Lim 841cc3da06 Handle arrow keys when waiting for key press (#1956) 2025-04-09 19:03:19 +10:00
MahouShoujoMivutilde 1878faa942 Implement files query to export files in the current directory as (#1949)
presented in lf (including filter/sorting)

`lf -remote "query $id files"`

This version updates `files` list only before running shell commands.
2025-04-09 16:37:55 +10:00
Joe Lim ffe4c97560 Change menu contents to be a string (#1954) 2025-04-07 14:23:25 +10:00
David Pedersen 2a3292560d Apply modernization fixes (#1921) 2025-02-23 17:05:20 +11:00
Joe Lim f9813744f7 Add dircounts to setlocal options (#1920)
* Remove plural from setlocal variable names

* Add `dircounts` for `setlocal`

* Update documentation

* Fix failing test
2025-02-19 10:43:15 +11:00
Joe Lim f0dddccb04 Fix background color when rendering filenames (#1849) 2024-11-14 11:05:37 +11:00
zenyu 4fefcf7aac Create key event expr with non-zero count (#1846) 2024-11-11 10:35:32 +11:00
David Pedersen 1b1628c378 Small optimizations for ui.go (#1826) 2024-11-03 03:14:08 +11:00
yarikandyarik 6cd51210e3 Add option to hide listBinds when pressing keys (#1815)
* add drawbinds option

* rename drawbinds to showbinds and change its place in docs

* minor changes in wording of showbinds option

* fix missing newlines

---------

Co-authored-by: yarik <dazzywi@github.com>
2024-10-22 23:45:48 +11:00
Joe Lim 4de690db5e Clear fileinfo if the directory is empty (#1808) 2024-10-11 10:18:13 +11:00
Oscar Wallberg 1c56620f57 feat: add mode, user and group info parameters (#1799)
* feat: add mode, user and group info parameters

* fix: correct function names

* fix: change mode to perm
2024-09-14 00:25:26 +10:00
Joe Lim 505c4ef6c0 Display line numbers on the main window only (#1789) 2024-08-10 22:39:21 +10:00
Joe Lim c2224cb97a Fix printing tags if it contains color (#1782) 2024-07-30 14:46:42 +10:00
Joe Lim b819d90be2 Fix clipped icon colors in Windows Terminal (#1777)
* Fix clipped icon colors in Windows Terminal

* Only print components if necessary
2024-07-16 10:30:08 +10:00
Joe Lim ddea7bff1b Remove deprecated ruler option (#1766)
* Remove deprecated `ruler` option

* Remove unused variable
2024-07-08 10:09:13 +10:00
Joe Lim e9faf966a0 Replace hidecursorinactive with hook commands (#1763)
* Replace `hidecursorinactive` with hook commands

* Remove `focusreport` setting
2024-07-01 12:17:22 +10:00
David Pedersen a018257d50 gofumpt lint and misc cleanup (#1682)
* gofumpt lint and misc cleanup

* Reorder fileInfo dircounts code to be clearer
2024-04-20 21:42:28 +02:00