mirror of
https://github.com/junegunn/fzf.git
synced 2026-10-30 10:05:58 +00:00
Handle int32 overflow
yes | fzf --tail=10 --preview 'echo "{n}"'
This commit is contained in:
2 files changed
+27
-8
No files matched your search
+3
-1
@@ -1,6 +1,8 @@
|
||||
package fzf
|
||||
|
||||
import (
|
||||
"math"
|
||||
|
||||
"github.com/junegunn/fzf/src/util"
|
||||
)
|
||||
|
||||
@@ -17,7 +19,7 @@ func (item *Item) Index() int32 {
|
||||
return item.text.Index
|
||||
}
|
||||
|
||||
var minItem = Item{text: util.Chars{Index: -1}}
|
||||
var minItem = Item{text: util.Chars{Index: math.MinInt32}}
|
||||
|
||||
func (item *Item) TrimLength() uint16 {
|
||||
return item.text.TrimLength()
|
||||
|
||||
Reference in new issue
Block a user