Releases: nyaosorg/go-readline-ny
Releases · nyaosorg/go-readline-ny
v0.12.1
CmdCompletion
andCmdCompletionOrList
narrows down candidates now. SoCompletion
interface side does not have to doCompletion.List
can now be omitted by setting basenames to nilcompletion.File
: Fixed: filename completion did not match anyone when./
is included in the path because the filepath package removes./
in the path.
CmdCompletion
andCmdCompletionOrList
で候補の絞り込みをするようにしたので、Completion
interface 側で絞り込みをしなくてもよくなったCompletion.List
は basenames に nil を設定して省略できるようになった。completion.File
で、ファイル名の中に./
が含まれている時にひとつもマッチしなかった問題を修正(filepath パッケージが./
を削除してしまうため)
v0.12.0
- Reimported and improved a subset of nyagos completion as a subpackage
completion
- Rewrite
examples/example2.go
to use the sub-packagecompletion
- Add a new field
LineFeedWriter
which is equivalent to LineFeed with an io.Writer parameter.
- nyagos の補完のサブセットを、サブパッケージ
completion
として逆輸入した。 - サブパッケージ
completion
を使用するようexamples/example2.go
を書き換えた。 - LineFeed に io.Writer パラメーターを追加した新フィールド
LineFeedWriter
を追加。
v0.11.7
- Change the global sync.Mutex variable to a field in an
Editor
instance. In a command bound to a key, it was imposible to create a newEditor
instance and call(*Editor) ReadLine
. - Rename
(*Editor) loolup(KEY)
to look up a command mapped to a KEY from both instance's table and global table toLookUp
(exposed) (KeyMap) BindKey(KEY,nil)
now removes the function assigned to KEY- Implement
(c Cell) String
that behaves equivalently tob:=&strings.Builder{};c.Moji.WriteTo(b);b.String()
(*Buffer) GetKey
now calls(*Buffer).Out.Flush
, so the user no longer needs to callFlush
explicitly.
- グローバルな sync.Mutex 変数を
Editor
インスタンスの変数に変更した。キーに割り当てられたコマンド内で、新たなEditor
インスタンスを生成して、(*Editor) ReadLine
を呼ぶことができない問題があった。 - インスタンスのテーブル・グローバルなテーブルの双方から、キーに割り当てられたコマンドを探す
(*Editor) loolup(KEY)
をLookUp
に改名(公開) (*KeyMap) BindKey(KEY,nil)
で KEY に割り当てられた機能を削除できるようにした。b:=&strings.Builder{};c.Moji.WriteTo(b);b.String()
と等価な動作をする(c Cell) String
を実装(*Buffer) GetKey
で(*Buffer).Out.Flush
を呼ぶようにしたので、ユーザは明示的にFlush
を呼ぶ必要はなくなった。
v0.11.6
- Reduced memory allocation counts for functions
StringToMoji
andGetStringWidth
- Add an new function:
MojiCountInString
( lower cost thanlen(StringToMoji(s))
)
- 関数
StringToMoji
とGetStringWidth
のメモリアローケーション回数を削減した - 新関数
MojiCountInString
を追加(len(StringToMoji(s))
よりコストが低い)
v0.11.5
- (#5) Fix Coloring is wrong on teraterm connecting to Ubuntu at executing
make demo
- Color sample
coloring/vimbatch.go
was usingESC[1;39;40m
instead ofESC[0m
when initializing. - Add a constant value
readline.ColorReset
forESC[0m
- Color sample
- TeraTerm で Ubuntu に接続して
make demo
を実行したときに色がおかしい不具合を修正- カラーサンプルの
coloring/vimbatch.go
が初期化する際にESC[0m
ではなく、ESC[1;39;40m
を使っていた。 - リセット用のカラーコード
ESC[0m
に相当する定数値readline.ColorReset
を用意
- カラーサンプルの
v0.11.4
- Update go-tty to v0.0.5 for to fix the issue that numbers of columns and lines were swapped at not Windows-OS
- Windows以外で桁数と行数が取り違えられる問題 を修正するため、go-tty を v0.0.5 へ更新しました。
v0.11.3
- Added a new field
PromptWriter
at the typeEditor
as a prompt hook that can correctly measures the width to be output even when a new line, an escape sequence, or an emoji are contained.
- 改行やエスケープシーケンス、絵文字が含まれていても出力する幅を正しく計測できるプロンプトフックとして、
Editor
型に新しいフィールドPromptWriter
を追加しました。
v0.11.2
Simplified the internal structure that was unnecessarily complicated.
v0.11.2 (May 1, 2023)
- Remove
(*Buffer) Write
that is not used. - Unexport
(*Buffer) RefreshColor()
that is useless for external applications - Sub package:
tty10
: fix goroutine leak (that is not used on default) - Add type:
AnonymousCommand
andSelfInserter
v0.11.1 (Apr 28, 2023)
- Create sub-package:
keys
that defines key codes - Rename
KeyGoFuncT
toGoCommand
- Rename
KeyFuncT
toCommand
- Hide
GetKey(ITty)
- Remove Key name constants:
K_mmmm
. Usekeys.*
- Remove Command name constants:
F_mmmm
. Use(Command) String()
method - Remove
(Result) String()
無駄に複雑化している内部構造を簡素化しました。
v0.11.2 (May 1, 2023)
- (使われている場所がなかった)
(*Buffer) Write
メソッドを削除 - (外部からは使いどころがない)
(*Buffer) RefreshColor()
メソッドを非公開化 - サブパッケージの
tty10
の goroutine リークを修正(デフォルトでは未使用) AnonymousCommand
(匿名のキー割り当てコマンド型)とSelfInserter
(文字挿入コマンド型)を追加
v0.11.1 (Apr 28, 2023)
- キーコードを定義するサブパッケージ
keys
を作成 - 型
KeyGoFuncT
をGoCommand
へ改名 - 型
KeyFuncT
をCommand
へ改名 - 関数
GetKey(ITty)
を隠蔽 - キー名定数
K_*****
を削除。かわりにキーコードそのものであるkeys.*
を直接ご利用ください - コマンド名定数
F_*****
を削除。かわりに(Command) String()
メソッドの結果をご利用ください - (使われている場所がなかった)
(Result) String()
を削除
v0.11.0
- Remove the fork version of go-tty and use the original one v0.0.4.
Because Windows Terminal's bug was fixed that is the reason to fork.
Test:- ① OK: CIRCLE DIGIT ONE: U+2460
- 👨🌾 OK: FARMER: MAN(U+1F468)+ZERO WIDTH JOINER(U+200D)+EAR OF RICE(U+1F33E)
- 邊󠄄 OK: KANJI with VARIATION SELECTOR(U+908A U+E0104)
- Add internal switch to use "golang.org/x/term" instead of "go-tty". Currently go-tty is used.
- Add internal switch to use "golang.org/x/text/width" instead of "go-runewidth". Currently go-runewidth is used.
- Remove the variable SurrogatePairOk. Use functions EnableSurrogatePair() and IsSurrogatePairEnabled()
- Remove the function NewDefaultTty(). Use golang.org/x/term or go-tty
- 以下のテストで動作確認ができており、fork 原因のWindowsTerminal の不具合が修正されているようなので、go-tty の独自forkバージョンを削除し、オリジナルの v0.0.4 を使用するようにした。
- ① OK: CIRCLE DIGIT ONE: U+2460
- 👨🌾 OK: FARMER: MAN(U+1F468)+ZERO WIDTH JOINER(U+200D)+EAR OF RICE(U+1F33E)
- 邊󠄄 OK: KANJI with VARIATION SELECTOR(U+908A U+E0104)
- go-tty のかわりに golang.org/x/term を使うための内部スイッチを用意(現行は従来どおり go-tty を使用)
- go-runewidth のかわりに golang.org/x/text/width を使うための内部スイッチを用意(現行は従来どおり go-runewidth を使用)
- 変数SurrogatePairOkを削除した。関数 EnableSurrogatePair() and IsSurrogatePairEnabled() を使用のこと
- 関数NewDefaultTtyを削除した。 golang.org/x/term もしくは go-tty を使用のこと
v0.10.1
- v0.10.0
- Change type
Coloring
interfaceInit()
andNext()
returnsColorSequence
(= int64 ) instead of intESC[0m
can now be output to reset the output attribute
- Change type
- v0.10.1
- Fix: some constants for color were broken at v0.10.0
- v0.10.0
Coloring
interface を変更Init()
とNext()
は int のかわりにColorSequence
(=int64) 型を返すものとしたESC[0m
で出力属性をリセットできるようになった
- v0.10.1
- v0.10.0 で色用の定数が壊れていたのを修正