1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-07-05 00:59:19 +02:00

bump gocui

This commit is contained in:
Ryooooooga
2022-11-14 22:23:14 +09:00
parent a6ebc5869e
commit cf048e4807
8 changed files with 74 additions and 33 deletions

View File

@ -39,6 +39,8 @@ const (
stateEscape
stateCSI
stateParams
stateOSC
stateOSCEscape
bold fontEffect = 1
faint fontEffect = 2
@ -124,11 +126,16 @@ func (ei *escapeInterpreter) parseOne(ch rune) (isEscape bool, err error) {
}
return false, nil
case stateEscape:
if ch == '[' {
switch ch {
case '[':
ei.state = stateCSI
return true, nil
case ']':
ei.state = stateOSC
return true, nil
default:
return false, errNotCSI
}
return false, errNotCSI
case stateCSI:
switch {
case ch >= '0' && ch <= '9':
@ -189,6 +196,16 @@ func (ei *escapeInterpreter) parseOne(ch rune) (isEscape bool, err error) {
default:
return false, errCSIParseError
}
case stateOSC:
switch ch {
case 0x1b:
ei.state = stateOSCEscape
return true, nil
}
return true, nil
case stateOSCEscape:
ei.state = stateNone
return true, nil
}
return false, nil
}