mirror of
https://github.com/kovidgoyal/kitty
synced 2026-06-08 22:28:24 +02:00
Improve performance when pasting large amounts of text into readline by not redrawing on every char
This commit is contained in:
@@ -31,6 +31,7 @@ func new_loop() *Loop {
|
||||
l.escape_code_parser.HandleSOS = l.handle_sos
|
||||
l.escape_code_parser.HandlePM = l.handle_pm
|
||||
l.escape_code_parser.HandleRune = l.handle_rune
|
||||
l.escape_code_parser.HandleEndOfBracketedPaste = l.handle_end_of_bracketed_paste
|
||||
return &l
|
||||
}
|
||||
|
||||
@@ -128,6 +129,12 @@ func (self *Loop) handle_rune(raw rune) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (self *Loop) handle_end_of_bracketed_paste() {
|
||||
if self.OnText != nil {
|
||||
self.OnText("", false, false)
|
||||
}
|
||||
}
|
||||
|
||||
func (self *Loop) on_signal(s unix.Signal) error {
|
||||
switch s {
|
||||
case unix.SIGINT:
|
||||
|
||||
Reference in New Issue
Block a user