mirror of
https://github.com/VladimirMarkelov/clui.git
synced 2025-04-30 13:48:50 +08:00
style fix
This commit is contained in:
parent
5f0413791c
commit
b4235b65f2
10
tableview.go
10
tableview.go
@ -660,9 +660,9 @@ func (l *TableView) processMouseClick(ev Event) bool {
|
|||||||
dx := ev.X - l.x
|
dx := ev.X - l.x
|
||||||
dy := ev.Y - l.y
|
dy := ev.Y - l.y
|
||||||
|
|
||||||
if l.topRow + dy - 2 >= l.rowCount {
|
if l.topRow+dy-2 >= l.rowCount {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
if dy == l.height-1 && dx == l.width-1 {
|
if dy == l.height-1 && dx == l.width-1 {
|
||||||
l.selectedRow = l.rowCount - 1
|
l.selectedRow = l.rowCount - 1
|
||||||
@ -686,7 +686,7 @@ func (l *TableView) processMouseClick(ev Event) bool {
|
|||||||
}
|
}
|
||||||
|
|
||||||
dy -= 2
|
dy -= 2
|
||||||
newRow := l.topRow + dy
|
newRow := l.topRow + dy
|
||||||
|
|
||||||
newCol := l.mouseToCol(dx)
|
newCol := l.mouseToCol(dx)
|
||||||
if newCol != l.selectedCol || newRow != l.selectedRow {
|
if newCol != l.selectedCol || newRow != l.selectedRow {
|
||||||
@ -804,7 +804,7 @@ func (l *TableView) ProcessEvent(event Event) bool {
|
|||||||
}
|
}
|
||||||
case term.KeyF4:
|
case term.KeyF4:
|
||||||
if l.onAction != nil {
|
if l.onAction != nil {
|
||||||
colID := l.selectedCol
|
colID := l.selectedCol
|
||||||
sort := l.columns[colID].Sort
|
sort := l.columns[colID].Sort
|
||||||
|
|
||||||
for idx := range l.columns {
|
for idx := range l.columns {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user