diff options
author | Canop <cano.petrole@gmail.com> | 2019-07-19 14:22:59 +0200 |
---|---|---|
committer | Canop <cano.petrole@gmail.com> | 2019-07-19 14:22:59 +0200 |
commit | ec657ff1ec83b7f9a6496f2a51e2c32e8ba6d0cc (patch) | |
tree | e4f13fb346dde5587b71bca98b97ed5dbd1c0adb /src/command_parsing.rs | |
parent | f3291c3e7a13c3d1867c7b1e2afbc3c3084c4246 (diff) |
change the behavior of open and alt-open on standard files
The logic behind opening has changed to allow easier opening of files in non terminal applications without closing broot.
**Old behavior:**
- in case of enter or double-click
- on a directory: open that directory, staying in broot
- on a file: open the file, quitting broot
- in case of alt-enter
- on a directory: cd to that directory, quitting broot
- on a file: cd to that file's parent directory, quitting broot
**New behavior:**
- in case of enter or double-click
- on a directory: open that directory, staying in broot
- on a file: open that file in default editor, not closing broot
- in case of alt-enter
- on a directory: cd to that directory, quitting broot
- on a file: open that file in default editor, quitting broot
Diffstat (limited to 'src/command_parsing.rs')
-rw-r--r-- | src/command_parsing.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/command_parsing.rs b/src/command_parsing.rs index b5533b7..085caac 100644 --- a/src/command_parsing.rs +++ b/src/command_parsing.rs @@ -32,7 +32,7 @@ impl Iterator for CommandSequenceTokenizer { return None; } let is_verb = if self.chars[self.pos] == ':' { - self.pos = self.pos + 1; + self.pos += 1; true } else { false |