Skip to content

feat!: better support TUI style UI#42

Draft
sidju wants to merge 14 commits intomainfrom
fired-fixup
Draft

feat!: better support TUI style UI#42
sidju wants to merge 14 commits intomainfrom
fired-fixup

Conversation

@sidju
Copy link
Owner

@sidju sidju commented Sep 8, 2025

  • Leave separating the command in/output from the editor to the UI, instead of printing ! and assuming this will act as a separator (not true for TUI). (Had a downside of being a breaking change for the UI trait)
  • Give a default implementation for MacroStore for a HashMap<String, Macro>. (Had a downside of requiring clearer specification of type if not populating the store, mainly noticed for minimal example and tests)
  • As a small fix added newlines between history entries when printing history.

- Leave separating the command in/output from the editor to the UI, instead of
  printing ! and assuming this will act as a separator (not true for TUI).
  (Had a downside of being a breaking change for the UI trait)
- Give a default implementation for MacroStore for a HashMap<String, Macro>.
  (Had a downside of requiring clearer specification of type if not populating
  the store, mainly noticed for minimal example and tests)
- As a small fix added newlines between history entries when printing history.
@sidju
Copy link
Owner Author

sidju commented Sep 8, 2025

I'll need to decide if I merge and release this as-is (0.15.0), or if I do a full finish up of the TODO.md and issues and release it as a 1.0.0 release.

David Sid Olofsson added 2 commits September 16, 2025 20:49
When tagging the first line is tagged as `'tag` and the last as `` `tag``,
allowing to quickly tag a selection and return to it precisely.

A potential shorthand of `"tag` would equal ``'tag,`tag``, but that won't be
implemented until the need has been felt.
It selects the other index in selection, so the starting index if used in the
ending position and the ending index if used in the starting position.
This also can be used to use the non-default index for commands that only take
a singular index, for example `:a` appends after the first line in current
selection, or which take index arguments, `,3m:` moves to after first line in
current selection.
David Sid Olofsson added 2 commits September 17, 2025 15:11
Fixes failing tests from using `:` as index literal.
This reduces the API/command breakage by changing how the tag resolution works.
I also find this solution to be a bit more obvious and easier to make visible
to the users.
@sidju sidju marked this pull request as draft October 6, 2025 13:48
@sidju
Copy link
Owner Author

sidju commented Oct 6, 2025

To be clear, I'm aiming to close off most if not all the TODO items in this PR
(so that there is one breaking API change on main, rather than multiple, and so that I can integrate the features into each other as well as change my mind about implementations a few times)

David Sid Olofsson added 2 commits October 22, 2025 12:35
No tests as of yet, testing is next
Removed ModificationMode::Squash option since it was near identical to Default.
David Sid Olofsson added 7 commits November 9, 2025 00:06
- Support absolute indexes ('*' as prefix)
- Support redo-all ('$')
- Support basic add/subtract operations
- Add explicit literal for current index ('.')
Add support for flexible addressing, printing full history, printing absolute
indices instead of relative to current.
- = no longer allows a selection (could be added back if requested).
- It accepts flags to print:
  - s for selection
  - a for full status
  - Defaults to selection if no flags given

(More flags will be added later)
First try properly utilizing an AI coding assistant, not easy to make it
produce good results but admittedly productive (with some awareness of it all
needing a proper thorough review and verification by a real developer)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant