Skip to content

Releases: nyaosorg/go-readline-ny

v0.12.0

12 May 23:54
Compare
Choose a tag to compare
  • Reimported and improved a subset of nyagos completion as a subpackage completion
  • Rewrite examples/example2.go to use the sub-package completion
  • 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

12 May 04:50
Compare
Choose a tag to compare
  • 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 new Editor 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 to LookUp (exposed)
  • (KeyMap) BindKey(KEY,nil) now removes the function assigned to KEY
  • Implement (c Cell) String that behaves equivalently to b:=&strings.Builder{};c.Moji.WriteTo(b);b.String()
  • (*Buffer) GetKey now calls (*Buffer).Out.Flush, so the user no longer needs to call Flush 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

08 May 04:15
Compare
Choose a tag to compare
  • Reduced memory allocation counts for functions StringToMoji and GetStringWidth
  • Add an new function: MojiCountInString ( lower cost than len(StringToMoji(s)) )

  • 関数 StringToMojiGetStringWidth のメモリアローケーション回数を削減した
  • 新関数 MojiCountInString を追加( len(StringToMoji(s)) よりコストが低い)

v0.11.5

06 May 17:08
Compare
Choose a tag to compare
  • (#5) Fix Coloring is wrong on teraterm connecting to Ubuntu at executing make demo
    • Color sample coloring/vimbatch.go was using ESC[1;39;40m instead of ESC[0m when initializing.
    • Add a constant value readline.ColorReset for ESC[0m

  • TeraTerm で Ubuntu に接続して make demo を実行したときに色がおかしい不具合を修正
    • カラーサンプルの coloring/vimbatch.go が初期化する際に ESC[0m ではなく、ESC[1;39;40m を使っていた。
    • リセット用のカラーコード ESC[0m に相当する定数値 readline.ColorReset を用意

v0.11.4

06 May 05:44
Compare
Choose a tag to compare

v0.11.3

05 May 11:58
Compare
Choose a tag to compare
  • Added a new field PromptWriter at the type Editor 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

01 May 16:40
Compare
Choose a tag to compare

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 and SelfInserter

v0.11.1 (Apr 28, 2023)

  • Create sub-package: keys that defines key codes
  • Rename KeyGoFuncT to GoCommand
  • Rename KeyFuncT to Command
  • Hide GetKey(ITty)
  • Remove Key name constants: K_mmmm. Use keys.*
  • 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 を作成
  • KeyGoFuncTGoCommand へ改名
  • KeyFuncTCommand へ改名
  • 関数 GetKey(ITty) を隠蔽
  • キー名定数 K_***** を削除。かわりにキーコードそのものである keys.* を直接ご利用ください
  • コマンド名定数 F_***** を削除。かわりに (Command) String() メソッドの結果をご利用ください
  • (使われている場所がなかった) (Result) String() を削除

v0.11.0

26 Apr 06:53
Compare
Choose a tag to compare
  • 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

13 Apr 20:34
Compare
Choose a tag to compare
  • v0.10.0
    • Change type Coloring interface
      • Init() and Next() returns ColorSequence (= int64 ) instead of int
      • ESC[0m can now be output to reset the output attribute
  • 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 で色用の定数が壊れていたのを修正

v0.9.1

10 Apr 06:01
Compare
Choose a tag to compare
  • Fix: a trash text m was printed when Coloring.Init() / .Next() returns 0

  • Coloring.Init() / .Next() が 0 を返した時、m というゴミ文字列が表示されるのを修正