mirror of
https://github.com/kovidgoyal/kitty.git
synced 2026-08-03 22:25:57 +00:00
Use the new string scanner everywhere
This commit is contained in:
parent
b8ce441453
commit
f42090766a
7 changed files with 8 additions and 12 deletions
|
|
@ -3,7 +3,6 @@
|
|||
package cli
|
||||
|
||||
import (
|
||||
"bufio"
|
||||
"fmt"
|
||||
"kitty/tools/cli/markup"
|
||||
"kitty/tools/tty"
|
||||
|
|
@ -38,7 +37,7 @@ func shell_input_parser(data []byte, shell_state map[string]string) ([][]string,
|
|||
raw := string(data)
|
||||
new_word := strings.HasSuffix(raw, "\n\n")
|
||||
raw = strings.TrimRight(raw, "\n \t")
|
||||
scanner := bufio.NewScanner(strings.NewReader(raw))
|
||||
scanner := utils.NewLineScanner(raw)
|
||||
words := make([]string, 0, 32)
|
||||
for scanner.Scan() {
|
||||
words = append(words, scanner.Text())
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue