mirror of
https://github.com/junegunn/fzf.git
synced 2026-10-13 00:20:20 +08:00
Add generic utils constraint function
This commit is contained in:
1 parent
14b5e1d88c
commit
6eb4b41e34
4 files changed
+5
-52
No files matched your search
+2
-2
@@ -3859,8 +3859,8 @@ func (t *Terminal) printColoredString(window tui.Window, text []rune, offsets []
|
||||
maxOffset := int32(len(text))
|
||||
var url *url
|
||||
for _, offset := range offsets {
|
||||
b := util.Constrain32(offset.offset[0], index, maxOffset)
|
||||
e := util.Constrain32(offset.offset[1], index, maxOffset)
|
||||
b := util.Constrain(offset.offset[0], index, maxOffset)
|
||||
e := util.Constrain(offset.offset[1], index, maxOffset)
|
||||
if url != nil && offset.url != url {
|
||||
url = nil
|
||||
window.LinkEnd()
|
||||
|
||||
Reference in new issue
Block a user