micro
micro copied to clipboard
The value for the "clipboard" option doesn't show up on status bar
The status of the clipboard shows null when used as a status bar item via adding $(opt:clipboard) to statusformatr or statusformatl
It will show properly if you set the clipboard option during that session, but when you exit and return it goes back to showing null.
The clipboard itself works as expected, this is not an issue with the clipboard functionality
macOS micro Version: 2.0.14, Commit hash: 04c57704 Proxmox micro version 2.0.11
https://github.com/user-attachments/assets/1f53a22a-8df8-4e0e-ba09-05f755db0cf9
We need to check the global-only options for the statusline, since they aren't stored locally:
diff --git a/internal/display/statusline.go b/internal/display/statusline.go
index 409f862c..6f7f3fcc 100644
--- a/internal/display/statusline.go
+++ b/internal/display/statusline.go
@@ -100,6 +100,9 @@ func (s *StatusLine) FindOpt(opt string) any {
if val, ok := s.win.Buf.Settings[opt]; ok {
return val
}
+ if val, ok := config.DefaultGlobalOnlySettings[opt]; ok {
+ return config.GlobalSettings[opt]
+ }
return "null"
}