Skip to content
Myr

Fix #391 - Strip non-printable characters

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Junegunn Choi · committed by Junegunn Choi · parent ae04f56 · Browse files · 1 file+7 added−1 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+7 added−1 removed

  • other:+7 added−1 removed

1 file+7 added−1 removed

modified:src/curses/curses.go+7 added-1 removed
9 unmodified lines
1011import (12 "fmt"13 "os"14 "strings"15 "syscall"16 "time"17 "unicode/utf8"18)
495 unmodified lines
514 C.clrtoeol()515}516517func Print(text string) {517 C.addstr(C.CString(text))518 C.addstr(C.CString(strings.Map(func(r rune) rune {519 if r < 32 {520 return -1521 }522 return r523 }, text)))524}525526func CPrint(pair int, bold bool, text string) {527 attr := _color(pair, bold)
28 unmodified lines