-
Notifications
You must be signed in to change notification settings - Fork 145
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Selection fails to highlight #226
Comments
Same here. I bisected it to these 4 commits cd44aab, 3c148a4, c3aeb75 and 387c463. It looks like it comes from Version: gotop v4.1.4 (Hadean) (via Nixpkgs) EDIT: I also tried another TE (kitty), it's visible but it still looks different than v4.1.3. |
Arch, and i3 here... None of the color schemes work with Alacritty, Tilix or XFCE term. |
same with gnome terminal |
Oddly enough, this patch makes the selection work again for me: diff --git a/termui/table.go b/termui/table.go
index 29e4c3f..e914a5d 100644
--- a/termui/table.go
+++ b/termui/table.go
@@ -98,7 +98,7 @@ func (self *Table) Draw(buf *Buffer) {
if self.ShowCursor {
if (self.SelectedItem == "" && rowNum == self.SelectedRow) || (self.SelectedItem != "" && self.SelectedItem == row[self.UniqueCol]) {
style.Fg = self.CursorColor
- style.Modifier = ModifierReverse
+ style.Modifier = 1 << 15
for _, width := range self.ColWidths {
if width == 0 {
continue This issue seems to begin with commit c3aeb75, as a result of package main
import (
"image"
"log"
ui "github.com/gizak/termui/v3"
)
type Table struct {
*ui.Block
}
func NewTable() *Table {
return &Table{
Block: ui.NewBlock(),
}
}
func (self *Table) Draw(buf *ui.Buffer) {
self.Block.Draw(buf)
style := ui.NewStyle(4)
style.Modifier = ui.ModifierReverse
buf.SetString(
"hello",
style,
image.Pt(self.Inner.Min.X, self.Inner.Min.Y),
)
}
func main() {
if err := ui.Init(); err != nil {
log.Fatalf("failed to initialize termui: %v", err)
}
defer ui.Close()
p := NewTable()
p.SetRect(0, 0, 50, 25)
ui.Render(p)
for e := range ui.PollEvents() {
if e.Type == ui.KeyboardEvent {
break
}
}
} |
@gardockt's fix works for me too |
Arch and i3 here. Problem still persists even though I have the newest version with the pr. Any ideas? |
Yeah, I got a regression on my side too. I'm just commenting that I'm aware of the issue and am neither dead, nor ignoring it; I simply haven't had time to context switch back to gotop in a while. |
Same issue here on different systems with the latest version. |
gotop version - gotop v4.1.4.r0.gcd0cf0f
os - Arch Linux 5.18.11-zen1-1-zen
Alacritty on Wayland
5.18.11-zen1-1-zen
The text was updated successfully, but these errors were encountered: