Use the new string scanner everywhere

This commit is contained in:
Kovid Goyal
2023-03-08 13:31:27 +05:30
parent b8ce441453
commit f42090766a
7 changed files with 8 additions and 12 deletions

View File

@@ -3,7 +3,6 @@
package ask
import (
"bufio"
"fmt"
"io"
"kitty/tools/cli/markup"
@@ -323,7 +322,7 @@ func choices(o *Options) (response string, err error) {
return err
}
if message != "" {
scanner := bufio.NewScanner(strings.NewReader(message))
scanner := utils.NewLineScanner(message)
for scanner.Scan() {
msg_lines = draw_long_text(int(sz.WidthCells), scanner.Text(), msg_lines)
}