mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-07-30 03:23:08 +03:00
vastly improve the logic for undo and redo
This commit is contained in:
@ -316,3 +316,9 @@ func TruncateWithEllipsis(str string, limit int) string {
|
||||
remainingLength := limit - len(ellipsis)
|
||||
return str[0:remainingLength] + "..."
|
||||
}
|
||||
|
||||
func FindStringSubmatch(str string, regexpStr string) (bool, []string) {
|
||||
re := regexp.MustCompile(regexpStr)
|
||||
match := re.FindStringSubmatch(str)
|
||||
return len(match) > 0, match
|
||||
}
|
||||
|
Reference in New Issue
Block a user