Skip to content

Commit

Permalink
Release v1.7.10 (#13)
Browse files Browse the repository at this point in the history
* Initial work on release v1.7.10, bulkrename feature

* Update fsnotify from v1.7.0 to v1.8.0

* gofmt

* Lot more work on bulkrename and bug fixes

* Don't reset bottom bar message on mouse move (e.g. hover to copy)

* Bulk-rename: show correct error msg on temp file missing

* Add a comment

* Bulk-rename: use notepad on Windows

* Fix rename navigation again somehow, use rundll32.exe on windows for bulkrename

* Reverse fen.UpdatePanes(true)

* Downgrade fsnotify back to 1.7.0, fsnotify.Remove() in ChangeDir() blocks forever on Windows 10

* Fix bulkrename on Windows by forcing notepad

* Fix a panic

* Bulk-rename: shorten an error msg

* Ctrl+Right: only check for unstaged/untracked file when fen.git_status is true

* Update TODO.md

* Add bulkrename confirmation prompt, make fen.ui_borders prettier

* Fix file previews drawing outside of --ui-borders

* Add known issue to README

* Add error message when not able to rename file with 'a'
  • Loading branch information
kivattt authored Nov 1, 2024
1 parent daef94b commit 3cfaf38
Show file tree
Hide file tree
Showing 9 changed files with 464 additions and 41 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ Arrow keys, hjkl, mouse click or scrollwheel to navigate (Enter goes right), Esc
`A` Flip selection in folder (select all files)\
`D` Deselect all, press again to un-yank\
`a` Rename a file\
`b` Bulk-rename (rename in editor)\
`V` Start selecting by moving\
`n` Create a new file\
`N` Create a new folder\
Expand Down Expand Up @@ -162,5 +163,6 @@ You can find examples in [lua-file-open-examples](lua-file-open-examples)
- Deleting files sometimes doesn't work on Windows (due to files being open in another program?)
- `go test` doesn't work on Windows
- The color for audio files is invisible in the default Windows Powershell colors, but not cmd or Windows Terminal
- Bulk-renaming a .git folder on Windows hangs fen forever

See [TODO.md](TODO.md) for other issues and possible future features, roughly sorted by priority
5 changes: 4 additions & 1 deletion TODO.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
## Source code comments with "PLUGINS:" in them are for things we have to change to make Lua plugins a possibility in the future

## TODOs, vaguely sorted by priority

- Bulk rename
Expand Down Expand Up @@ -25,7 +27,8 @@
- Warning message or enable hidden files when creating a new hidden file/folder
- Allow creating new files/folders with absolute paths (use fen.GoPath())
- A sort of "back arrow" key for going to the last folder we were in
- Right pane disappearing when no preview/folder
- Add right pane disappearing when no preview/folder?
- Remove local tracked git repository when .git folder not found anymore

- Abstract away this common pattern:
```go
Expand Down
7 changes: 3 additions & 4 deletions bottombar.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ func NewBottomBar(fen *Fen) *BottomBar {
}
}

// It is the responsibility of the main.go event loop to set alternateText empty
func (bottomBar *BottomBar) TemporarilyShowTextInstead(text string) {
bottomBar.alternateText = text
}
Expand All @@ -40,10 +41,8 @@ func (bottomBar *BottomBar) Draw(screen tcell.Screen) {

freeBytesStr += " free"

alternateTextToUse := bottomBar.alternateText
if bottomBar.alternateText != "" {
tview.Print(screen, "[teal:]"+tview.Escape(bottomBar.alternateText), x, y, w, tview.AlignLeft, tcell.ColorDefault)
bottomBar.alternateText = ""
}

stat, err := os.Lstat(bottomBar.fen.sel)
Expand Down Expand Up @@ -86,7 +85,7 @@ func (bottomBar *BottomBar) Draw(screen tcell.Screen) {
}

leftLength := 0
if alternateTextToUse == "" {
if bottomBar.alternateText == "" {
_, leftLength = tview.Print(screen, text+noWriteEnabledText, x, y, w, tview.AlignLeft, tcell.ColorBlue)
}
_, rightFreeBytesStrLength := tview.Print(screen, " "+tview.Escape(freeBytesStr), x, y, w, tview.AlignRight, tcell.ColorDefault)
Expand Down Expand Up @@ -231,7 +230,7 @@ func (bottomBar *BottomBar) Draw(screen tcell.Screen) {
helpTextXPos = x + leftLength
}

if alternateTextToUse == "" {
if bottomBar.alternateText == "" {
tview.Print(screen, "[::d]"+helpText, helpTextXPos, y, spaceForHelpText, tview.AlignLeft, tcell.ColorDefault)
}
}
Loading

0 comments on commit 3cfaf38

Please sign in to comment.