Jan 25, 2025
- Slightly reduced the number of calls to the pattern matching function for syntax highlighting
Jan 23, 2025
- Updated the dependency of go-readline-ny to v1.7.3 that improves processing time when the syntax highlighting evaluation function is slow by reducing the number of its calls
Jan 22, 2025
- Enhanced multi-line syntax highlighting to allow color changes across line boundaries. #6
- Discontinued support for the field
.LineEditor.Coloring
, which was used for the old syntax highlighting. For compatibility,(*Editor)
SetColoring remains available - To configure highlighting, use
Editor.{Highlight, DefaultColor, ResetColor}
instead ofEditor.LineEditor.{Highlight, DefaultColor, ResetColor}
.
Please update the code to assign values to the fields as shown below:
var ed multiline
ed.LineEditor.Highlight = ...
toed.Highlight = ...
ed.LineEditor.ResetColor = ...
toed.ResetColor = ...
ed.LineEditor.DefaultColor = ...
toed.DefaultColor = ...
Thanks to @apstndb
Jan 19, 2025
- Fix a panic caused by incomplete support for the new syntax highlighting in go-readline-ny v1.7
Jan 18, 2025
- Update go-readline-ny dependency to v1.7.0. It introduced a new interface for syntax highlighting.
- Deprecated
(*Editor) SetColoring
Jan 9, 2025
- Updated go-readline-ny dependency to v1.6.3, which fixes an issue where the default color setting was incorrectly set to bold.
Nov 28, 2024
- Add
NewPrefixCommand
as the constructor of the structurePrefixCommand
Nov 24, 2024
- When prefix key(Escape) is pressed, echo it
- Assign Escape → Enter to submit
Nov 20, 2024
- Implement the incremental search (Ctrl-R) #4
Thanks to @apstndb
Nov 19, 2024
- Fix: on the legacy terminal of Windows, cursor does not move to the upper line
- Fix: on the terminal of Linux/macOS desktop, backspace-key could not remove the line feed (#5,Thanks to @apstndb)
Nov 9, 2024
- Fix: when editing the longer lines than screen height, the number of the lines scrolling was one line short
( It seemed to assume the height of status line which does not exist on default, therefore make the field
.StatusLineHeight
and use it as the height of the status line. ) - Fix: with no next history entry, when trying to move to the next line at the bottom line, cursor had moved at the top line. ( It was the behaviour to move the top line of the next entry of the history. But, because no next entry exists, the cursor moved to the top line without changing the current entry of history )
Nov 9, 2024
- With modifying go-readline-ny on v1.6.1: Fix: some text was missing when pasting multi-lines using the terminal feature of Linux Desktop (#3,Thanks to @apstndb)
Nov 7, 2024
- Prevent from incorrect rendering when the prompt includes
\n
(All lines except the last one of the prompt are displayed only on the first line of the edit line,Thanks to @apstndb)
Nov 4, 2024
- The prediction of go-readline-ny v1.6.0 is available now on the bottom line
Jun 10, 2024
- Not only the last entry of history, but all modified entries are kept the last value until the current input is completed
May 27, 2024
- The text before the first Ctrl-P/N is treated as if it were the latest entry in the history not to lose them
May 18, 2024
- Modify the features of Ctrl-P and Ctrl-N
- Ctrl-P : When the cursor exists the top of lines, move BACK through the history list, fetching the previous lines. Otherwise move the cursor to the previous line.
- Ctrl-N : When the cursor exists the bottom of lines, move FORWARD through the history list, fetching the next lines. Otherwise move the cursor to the next line.
Sep 30, 2023
- Fix: Could not build with go-readline-ny v0.15.0
- Use
(*Editor) LineFeedWriter
instead ofLineFeed
- Use
Sep 2, 2023
- Fix: Dirty flag was not set on inserting an empty line after an empty line
- Implement
(*Editor) SubmitOnEnterWhen
Aug 17, 2023
- Rename and export Editor's methods:
- CmdYank, CmdNextHistory, CmdPreviousHistory, CmdDeleteChar,
CmdDeleteChar, CmdBackwardDeleteChar, CmdForwardChar,
CmdBackwardChar, CmdPreviousChar, CmdNextLine
- CmdYank, CmdNextHistory, CmdPreviousHistory, CmdDeleteChar,
- Fix: GotoEndLine() did not work as expected when .lines[] is lower than 1
- Rename storeCurrentLine() to Sync() (new public method)
- Fix: display disorder when deleting a blank line with C-d
May 29, 2023
- Add key assigns
- ESC p : previous history
- ESC n : next history
- Implement new methods:
(*Editor) Lines
(*Editor) GotoEndLine
(*Editor) CursorLine
May 19, 2023
- Tab characters can now be represented by a few spaces up to every fourth position instead of ^I
- Fix: the width of the line header had not been counted incorrect
May 18, 2023
- More lines than the terminal's maximum ones are editable now without disturbing the screen
May 17, 2023
- Fix: If
SetDefault
was called with only one line andSetMoveEnd
was called with false or not called, the line was printed twice.
May 16, 2023
- Implemented methods
(*Editor) SetDefault
and(*Editor) SetMoveEnd
to specify initial text and cursor position. (See example-default.go)
May 9, 2023
- Implement method
BindKey
- Rename and exposed internal method
submit
andnewline
asSubmit
andNewLine
- Deprecate
SwapEnter
- Add example:
examples/example-swap.go
May 6, 2023
Thanks to @spiegel-im-spiegel
May 2, 2023
- Use
PromptWriter
on go-readline-ny v0.11.3
May 1, 2023
- Fix: Backspace did not work to delete backward character since v0.6.9
- Update for go-readline-ny v0.11.2
- Ctrl-B can move cursor to the end of the previous line
- Ctrl-F can move cursor to the beginning of the next line
Apr 28, 2023
- Fix for go-readline-ny v0.11.1
- Remove
Read()
. Use(*Editor).Read()
- Remove
New()
. Use&Editor{}
- Hide
(*Editor).Prompt
Apr 26, 2023
- Fix for go-readline-ny v0.11.0
Apr 19, 2023
- Disable Ctrl-S and Ctrl-R (one line version incremental search)
- Add the method:
(*Editor) SwapEnter()
- Add the method:
(*Editor) SetHistoryCycling()
Apr 17, 2023
- Bind PAGEDOWN and PAGEUP to refer history
- Add 4 setter methods to the type Editor
Apr 14, 2023
- Fix for go-readline-ny v0.10.1
Apr 13, 2023
- Fix for go-readline-ny v0.10.0
Apr 10, 2023
- Fix: pasting emoji caused the cursor position incorrect
- Fix: Ctrl-Y: the cursor position was not moved at the expected position
- (Editor) Read(): Ctrl-C stops the current loop and returns readline.CtrlC
- Fix: Coloring did not work not on the current line
Apr 9, 2023
New()
never raises panic now. Instead,(Editor) Read()
returns an error on initializing.
Apr 8, 2023
- Bug fix (Ctrl-Y on v0.6.0)
- Fix: screen was distorted when line longer than the screen width exists
New()
is marked as Deprecate. It panics when initilizing failed.
Apr 8, 2023
- Support: Ctrl-Y: pasting multiple lines
- Fixed: the control code was displayed as it was
- Ctrl-P/N: Set cursor position the tail of the line
Apr 6, 2023
- Implement clear (ESCAPE)
- Implement history (ALT-P/ALT-N/CTRL-DOWN/CTRL-UP)
Apr 2, 2023
- Rename type:
MultiLine
toEditor
- Made the private field
editor
(readline.Editor
) public asLineEditor
- The method
Read
initializes the instance when it has not been
( The instance does not have to be initalized withNew
function when it is declared withvar
)
Apr 1, 2023
- Made a class which has a constructor New and a method Read. The function Read still available
- Enabled to change the prompt
- Repaint with Ctrl-L
- Refactored the whole code
May 25, 2023
- Enter and Ctrl-m can split the current line
- Delete and Backspace can join lines.
May 25, 2023
- The first version.