Previously the history position was only reset when executing the
history prev/next command in normal mode, so it was not reset if you
entered command-line mode then started moving through the history.
This fixes an issue where if you stared a search then deleted the search
text (with e.g. backspace) it would perform a search for the empty
string and move the selection to the next file.
* Fix some multibyte character completion bugs
- matchLongest now operates on runes instead of bytes so we don't
complete part of a multibyte character.
- Fix some places that mixed string and rune slice indices.
* Fix wrong menu completion for subdirectories
When selecting a menu completion for a file in a subdirectory, the
entire filename would be appended to the command line, even if you had
already typed part of it.
* Escape file completions in menu completion
* Minor refactors and typo fixes
* Fix cmd-menu-complete-back bug
The first use of cmd-menu-complete-back after opening the completion
menu was incorrectly selecting the before-last completion instead of the
last completion.
* Allow completing broken symlinks
Also skip files with stat errors instead of returning.
* Add command to accept current menu selection
This is useful when completing filenames. For example
cmap <c-y> :cmd-menu-accept; cmd-menu-complete
can be used to accept the selected directory completion, then complete
files in the directory.
* Complete command names for map and cmap
* initial tags implementation
* add tag to complete.go
* add gTagsPath to os_windows.go
* change behaviour to match other commands
* add tag-toggle to complete.go
* add tag and tag-toggle to docs
* address feedback about tags
* add scrollup scrolldown builtin cmd
Scrollup/down move window pane without moving current cursor position.
Default keybinding would be <c-y> for scrollup and <c-e> for scrolldown
just like in vim.
* limit scrolldown when reached bottom
scrolodown will not allow empty space
Fix typo
* Allow to configure time format in the info column
* Update infotimefmt PR from Krzysztof Maicher
Add format length, rename options
Co-authored-by: Krzysztof Maicher <krzysztof.maicher@gmail.com>
* fixed bug when switching commands
* filter and searches are now reset, whenever prompt is reset
* don't interrupt %-shell commands
* filter and search are now correctly started and stoped on cd
* movement commands now don't stop prompts
* forgot shell-pipe check in delete command
* added first version of interactive filter
* small fix when loading new file
* don't reset filter when directory is reloaded automatically
* reapply filter when options for searching change
* current filter or arguments now prefilled in the prompt
* empty filter can now be supplied
* added new setfilter command for use in scripts
* added incfilter option
* added very basic documentation
* added filter indication in statusbar
* added option to display filter to prompt
The absolute path of symlinks were getting saved, so bookmarking a symlink
directory would cause the absolute path to be saved and loaded instead.
What's saved now is the current path string as understood by lf instead, so
path to symlinks can be saved too and they won't get dereferenced when
loading.
* Fix replace dialog for symlinks
If the oldPath is a symlink to the newPath or vice versa, than os.Stat()
would resolve this symlink, and both the oldStat and newStat would be
the same. Hence, the replace dialog would not appear and the newPath
file would be overwritten by the oldPath file whilst the oldPath would
be deleted.
It is the same story when the oldPath and newPath are both symlinks to
the same file.
* Fix completion in the case of broken symlinks
If the current directory contains broken symlinks then matchFile() would
return at first broken symlink.
Let's consider the following example:
$ ls -F ~/
broken@ dir/ file
The broken@ is a symlink to ~/foo - non existent file.
If one would enter the following command in lf:
:cd ~/<tab>
it would not suggest possible completion options because matchFile()
would return as soon as it meet the broken symlink.
* Don't resolve symlinks when move files/dirs (#571)
This will allow to move broken symlinks.
* Fix symlinks copying/moving (#571)
Copy symlinks, do not try to resolve it and copy the file pointed by
this symlink. Also this allows to copy symlink to directory.