The previous mechanism used histget() to get the last command or
expression to detect if the user issued a `:wq` or similar. This had the
issue where if a user issued a `:wq`, started vim again, then entered
oil and saved via some mechanism that is _not_ a command (e.g. a
keymap), we would incorrectly detect that `:wq` and exit after saving.
The new mechanism tracks all keypresses and may end up with false
negatives (e.g. ":wqaff<backspace><backspace>ll"), but those are less
frustrating than false positives.
* fix: close preview window when leaving oil buffer
* refactor: try different approach for closing the preview window
* fix: use util.is_oil_bufnr
---------
Co-authored-by: Steven Arcangeli <stevearc@stevearc.com>
* feat: do not close preview when cd into dir
* refactor: add helper method to run function after oil buffer loads
* Keep preview window open
* Remove some test logic
* Use `run_after_load` when moving to parent directory
* Remove unnecessary update of current window
* refactor: create helper function for updating preview
---------
Co-authored-by: Steven Arcangeli <stevearc@stevearc.com>
* feat(windows-trash): support for deleting to windows trash
* feat(windows-trash): add support for view, restore and purge
* fix(windows-trash): undefined path on M.list
* chore(windows-trash): modify comments
* fix(windows-trash): show correct original_path
* fix(windows-trash): add self to powershell_date_grammar
* fix(windows-trash-support): parse deleted date as number
* fix(fs): do not add innecesary \\ on Windows
* feat: extend windows trash adapter
* perf(windows-trash): powershell -> libuv (move, purge and copy)
* fix: don't prompt to save when opening trashed file
* lint: fix luacheck error
* lint: fix luacheck errors
* lint: luacheck error
---------
Co-authored-by: Steven Arcangeli <506791+stevearc@users.noreply.github.com>
* feat: allow multiple hlgroups inside one column
* types: refactor formatting of highlight types
* types: LuaLS can't infer type information from unpack
---------
Co-authored-by: Steven Arcangeli <506791+stevearc@users.noreply.github.com>
* Implement actions for sending oil entries to quickfix/location-list
* Use vim.notify instead of vim.notify_once in util quickfix function
* Remove redundant files/directories options for sending to qf
always send just files
* set qflist/loclist with a single call
* Add type annotations and default values for send_to_quickfix
* In visual mode, send only selected items to qf
* perf: only execute on current buffer since this event is called on each buffer
* fix: only execute `SessionLoadPost` autocommand when a full session is loaded
* wip: skeleton code for trash adapter
* refactor: split trash implementation for mac and linux
* fix: ensure we create the .Trash/$uid dir
* feat: code complete linux trash implementation
* doc: write up trash features
* feat: code complete mac trash implementation
* cleanup: remove previous, terrible, undocumented trash feature
* fix: always disabled trash
* feat: show original path of trashed files
* doc: add a note about calling actions directly
* fix: bugs in trash implementation
* fix: schedule_wrap in mac trash
* doc: fix typo and line wrapping
* fix: parsing of arguments to :Oil command
* doc: small documentation tweaks
* doc: fix awkward wording in the toggle_trash action
* fix: warning on Windows when delete_to_trash = true
* feat: :Oil --trash can open specific trash directories
* fix: show all trash files in device root
* fix: trash mtime should be sortable
* fix: shorten_path handles optional trailing slash
* refactor: overhaul the UI
* fix: keep trash original path vtext from stacking
* refactor: replace disable_changes with an error filter
* fix: shorten path names in home directory relative to root
* doc: small README format changes
* cleanup: remove unnecessary preserve_undo logic
* test: add a functional test for the freedesktop trash adapter
* test: more functional tests for trash
* fix: schedule a callback to avoid main loop error
* refactor: clean up mutator logic
* doc: some comments and type annotations
We were passing in `style = "minimal"` to `nvim_open_win`, which sets a
lot of default window options. If we remove that, the style of the
floating window will match the other oil windows. Users can use
`float.override` to set `style = "minimal"` if they want the previous
behavior.
This was only necessary to begin with because I was using `vim.wo` to
set window options. I mistakenly thought that would set the option as
window-local, but it did not. This was fixed in
6f8bf067c0. Now all the window options
should function as expected without the extra logic.
If you use oil and you want to still use netrw, set
`default_file_explorer = false`.
It is nonsensical to both use netrw _and_ have oil hijack directory
buffers (which was the case for the default config). It also causes
undefined behavior and bugs. When `default_file_explorer = true` (the
default) oil will now disable netrw for you.
* (feat) Added override function for floatwin
* (feat) Added in-place floatwin option modification
Added in-place modification of floatwin options, and removed example
from config.lua.