Commit Graph

186 Commits

Author SHA1 Message Date
Michael Peters
25b4f6943a Merge branch 'master' into michael 2022-10-02 15:37:01 -05:00
Paul Ouellette
cb7aa13218
Fix a few completion bugs and add a few small features (#934)
* 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
2022-10-01 16:31:58 +03:00
Christian Zangl
e03143299d
Add a spacer %S to the promptfmt (#867) 2022-07-10 15:32:55 +03:00
Michael Peters
503a659983 remove loading... indicator (since it's annoying) 2022-06-26 15:50:06 -05:00
Gokcehan
304026d680 use regular selection style for tags
cc #791
2022-03-28 17:58:33 +03:00
Gokcehan
27a11ae507 use reverse style for tags for the selection
cc #791
2022-03-28 15:50:10 +03:00
Santos
5a5628d667
Add tags (#791)
* 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
2022-03-28 15:43:05 +03:00
Gokcehan
2ddaf43421 count dirs while reading the parent dir
This commit moves directory counting with 'dircounts' option from ui
printing to dir reading to be run asynchronously without locking the ui.
On the other side, disadvantage of this approach is that if 'dircounts'
option is changed at runtime, then directory counts may not be available
requiring a manual 'reload'. Indicators for errors are changed to '!'
instead of '?' to distinguish them from missing values.
2022-03-19 19:01:24 +03:00
Gokcehan
5927a506f4 cleanup 2022-03-19 17:39:04 +03:00
Gokcehan
089e6dc705 init navigation after evaluation of config file
cc #748 #759
2022-03-11 15:21:27 +03:00
Gokcehan
b5de2cd666 cleanup
cc #751
2022-02-12 12:54:11 +03:00
Christian Zangl
b08ab8dfb7
Continue PR: configure time format in the info column (#751)
* 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>
2022-02-12 12:23:22 +03:00
Christian Zangl
cbb80a0d44
add get-dirsize command (#750) 2022-02-12 12:21:49 +03:00
Gokcehan
7872455021 restart event polling after ui resume on windows
cc #677
2021-10-19 22:51:25 +03:00
SPFab
ff0933ca03
Added filter command (#667)
* 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
2021-08-21 16:40:24 +03:00
Gokcehan
9885c4be7a trim command prefix when it is longer than width
cc #648
2021-06-13 01:09:19 +03:00
Gokcehan
eaaf08e425 ignore erase line escape code
cc #440
2021-05-30 20:43:17 +03:00
Gokcehan
599e42c12b calculate rune widths properly in shell outputs 2021-05-30 17:35:44 +03:00
Gokcehan
5d439419ea scroll when the prompt is longer than the width
cc #269
2021-05-30 17:24:19 +03:00
Marius
843afdfe4f
Make ratios behave like ratios (#622)
Integer division causes miscalculation of pane widths. With `set ratios 100:200:300` the first two panes have width 0, the third pane will take up all space (unless you happen to have a huge terminal). I noticed this when fine tuning ratios, e.g. going from `1:2:3` to something like `10:21:30`.
2021-05-13 21:25:04 +03:00
Gokcehan
8739087fe1 increase lookahead length for color escapes
cc #609
2021-04-15 17:23:25 +03:00
gotroyb127
0cfd34f30d
add 'waitmsg' option to configure the message after shell-wait commands (#604) 2021-04-06 18:57:23 +03:00
Gokcehan
73be81595e handle ui suspend/resume errors
cc #592
2021-03-28 18:54:40 +03:00
Gokcehan
2c3cd35a5d use x/term instead of stty/pause to prompt any key
cc #480
2021-02-21 18:01:20 +03:00
Gokcehan
4c0efdcb41 use suspend/resume api in tcell v2.2.0
cc #480
2021-02-21 17:34:38 +03:00
Gokcehan
1b93f2232e show number of selected/saved files in status line
cc #143
2021-02-13 17:45:18 +03:00
Gokcehan
60d6119858 add link/user/group to statline when available
cc #365
2021-02-12 16:01:54 +03:00
Gokcehan
2aa50aecaf show unknown mapping error for unbind mouse events
cc #268 #570
2021-01-29 19:47:28 +03:00
Gokcehan
13d19d84f9 add 'mouse' option to enable/disable mouse events
cc #268 #570
2021-01-29 19:36:27 +03:00
Gokcehan
c6cf0e61ba only combine non-spacing mark characters
cc #565
2021-01-27 02:22:40 +03:00
Gokcehan
a13c14fb07 add support for mouse buttons and wheels
cc #268
2021-01-19 01:20:34 +03:00
Gokcehan
2af2c6de31 fix tab character when printing
cc #496
2021-01-18 21:27:34 +03:00
Gokcehan
d6c5590ad0 display combining characters in the text
cc #496
2021-01-18 20:48:31 +03:00
SPFab
07d42c9a80
Added new Promptfmt Option to remove trailing separator (#545)
* Added new Promptfmt Option to remove trailing seperator

* Small fix

* small fix with multiple format options
also renamed the format options
2021-01-11 00:37:41 +03:00
neeshy
b5f6f6edee
Don't redraw volatile previews on ticker period (#546) 2021-01-04 17:01:29 +03:00
Gokcehan
42eb27823e consider icons/numbers when showing info
cc #548
2021-01-03 01:53:06 +03:00
neeshy
1e94f4533e
Guarantee preview/previewClear ordering (#537)
* Use chan struct{} in place of chan bool

* Revert "nav.checkReg now returns a boolean instead of calling nav.preview"

* Guarantee preview/previewClear ordering

* Pass the file path to the cleaner script
2020-12-27 04:23:03 +03:00
neeshy
82f03102a5
Add ability to use image previewers (#531)
* Return early on error in nav.preview

* nav.checkReg now returns a boolean instead of calling nav.preview

* Pass width, height, x, and y parameters to preview script

* Check previewer for exit code

If non-zero the preview will be assumed to have side-effects.

* Add the cleaner option

This is called upon selection changes if the previous preview was
volatile. To this end, volatilePreview was added to the nav struct
2020-12-24 16:13:20 +03:00
Gokcehan
9e5d386304 golint 2020-12-19 17:56:27 +03:00
Gokcehan
90b3b166e1 import tcell/v2 from gitlab.com/Provessor/lfp 2020-12-04 23:59:12 +03:00
Gokcehan
ce5c5845e7 use year instead of hh:mm for old files in info
Related #507
2020-11-22 17:18:17 +03:00
Gokcehan
6fa6137124 cleanup
Related #482
2020-10-14 22:03:25 +03:00
2pac
17ed724e67
Completition menu cycling #72 (#482)
* utility modulus function

* ui adapt for tab menu cycle

* refactor(listMatches) for tab menu cycle

* refactor(draw) handle tab menu selection highlight

* refactor(eval) cmd-complete cycle + reset handles

* feat: added backtab counter-cycle in the completition menu

* cleanup

* docs changes

* refactor: make tab cycle own commands

* docs: tab cycle documentation

* bug: the matches list was not complete because index +2 after row end

* refactor(tab cycle): handle the complete menu command print

* refactor(tab cycle): make the cmdTmp varibale mymic cmdAccLeft + check for partial commands

* refactor(tab cycle): fix how to handle the menu completiton from different events

* fix(tab cycle): fix cmd-complete so that it works with new tab cycle commands

* style: changed puprle to reverse

* cleaned up cycle logic + reverted listMatches

* cleaned up eval logic for cycle feat.

* cleanup

Co-authored-by: 2pac <tarasyarema@pm.me>
2020-10-14 19:42:44 +03:00
Gokcehan
228a20ffd1 rename bs to backspace 2020-10-10 17:34:29 +03:00
Alexey Yerin
cf79726d21
feat: add ability to map lone <esc> (#475)
Since d2414f7580 <esc> resets key buffer
but this feature prevents binding lone <esc>
2020-10-02 21:30:31 +03:00
Gokcehan
355075cf75 cleanup 2020-09-13 14:55:17 +03:00
Gokcehan
ec512dfe31 read events in the main loop
Related #445
2020-09-07 18:40:57 +03:00
gotroyb127
f248ce77a1
fixes 'numbers are bold when the filename is bold' (#462)
* fixes 'numbers are bold when the filename is bold'

* do it correctly
2020-09-06 17:52:11 +03:00
Gokcehan
ab6549679b rename backspace/backspace2 to bs/bs2 again
Related #445
2020-09-05 12:56:12 +03:00
Gokcehan
5e9580500c show loading directories with previous file list
Related #414
2020-09-05 12:55:27 +03:00