[PR #189] [MERGED] Implementing text input field widget. #244

Closed
opened 2026-03-03 16:23:30 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/mum4k/termdash/pull/189
Author: @mum4k
Created: 4/26/2019
Status: Merged
Merged: 4/27/2019
Merged by: @mum4k

Base: develHead: text-input


📝 Commits (10+)

  • bf72b5d Skeleton of the TextInput widget.
  • b031be6 Adding a type that holds data in the text input field.
  • 2cfaf25 Initial functionality and tests for the field editor.
  • 2e7d295 Planning out the editing algorithm.
  • beb3777 Intermediate commit.
  • b33c3d2 Logic that returns number of cells before and after.
  • 72989e7 Editor: support for insertion and scrolling.
  • c890f0b Editor can delete runes before the cursor.
  • afe7055 Merge branch 'devel' into text-input
  • da70101 Merge branch 'devel' into text-input

📊 Changes

20 files changed (+5460 additions, -294 deletions)

View changed files

📝 CHANGELOG.md (+6 -0)
📝 README.md (+13 -1)
doc/images/termdashdemo_0_7_0.gif (+0 -0)
doc/images/termdashdemo_0_9_0.gif (+0 -0)
doc/images/textinputdemo.gif (+0 -0)
📝 internal/area/area.go (+23 -0)
📝 internal/area/area_test.go (+85 -0)
📝 internal/canvas/buffer/buffer.go (+5 -0)
📝 internal/canvas/buffer/buffer_test.go (+12 -0)
📝 internal/runewidth/runewidth_test.go (+2 -2)
📝 keyboard/keyboard.go (+75 -2)
📝 termdashdemo/termdashdemo.go (+139 -60)
📝 terminal/termbox/event.go (+71 -131)
📝 terminal/termbox/event_test.go (+104 -98)
widgets/textinput/editor.go (+417 -0)
widgets/textinput/editor_test.go (+1813 -0)
widgets/textinput/options.go (+265 -0)
widgets/textinput/textinput.go (+377 -0)
widgets/textinput/textinput_test.go (+1832 -0)
widgets/textinput/textinputdemo/textinputdemo.go (+221 -0)

📄 Description

Fixes #65.

Also:

  • adding a function that splits an area into two based on an absolute number of cells.
  • changing how keyboard events are processed, no longer translating multi-key shortcuts to multiple keyboard events.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/mum4k/termdash/pull/189 **Author:** [@mum4k](https://github.com/mum4k) **Created:** 4/26/2019 **Status:** ✅ Merged **Merged:** 4/27/2019 **Merged by:** [@mum4k](https://github.com/mum4k) **Base:** `devel` ← **Head:** `text-input` --- ### 📝 Commits (10+) - [`bf72b5d`](https://github.com/mum4k/termdash/commit/bf72b5ddc27ac7df8177bacd4bad7515739a351c) Skeleton of the TextInput widget. - [`b031be6`](https://github.com/mum4k/termdash/commit/b031be60462aa37404971195e83039e6137b90bd) Adding a type that holds data in the text input field. - [`2cfaf25`](https://github.com/mum4k/termdash/commit/2cfaf25b9b1e7fad857adbafbbaf8771424f8bcc) Initial functionality and tests for the field editor. - [`2e7d295`](https://github.com/mum4k/termdash/commit/2e7d295af76bd0caaa62fac088c1f50791b2b0ef) Planning out the editing algorithm. - [`beb3777`](https://github.com/mum4k/termdash/commit/beb37775b8e2757ee6734198eac3c62408a416fa) Intermediate commit. - [`b33c3d2`](https://github.com/mum4k/termdash/commit/b33c3d2eece2d023f3b3c077c0478be02a67bd5d) Logic that returns number of cells before and after. - [`72989e7`](https://github.com/mum4k/termdash/commit/72989e7e391d5d710d693e5542f21f625b855db3) Editor: support for insertion and scrolling. - [`c890f0b`](https://github.com/mum4k/termdash/commit/c890f0be5f61511b2b6b8fefb0cefe17864d523e) Editor can delete runes before the cursor. - [`afe7055`](https://github.com/mum4k/termdash/commit/afe70553e51771d523a9cd1737780c105b304fd3) Merge branch 'devel' into text-input - [`da70101`](https://github.com/mum4k/termdash/commit/da70101c2873319a15d2410033f6f6fb24e92731) Merge branch 'devel' into text-input ### 📊 Changes **20 files changed** (+5460 additions, -294 deletions) <details> <summary>View changed files</summary> 📝 `CHANGELOG.md` (+6 -0) 📝 `README.md` (+13 -1) ➖ `doc/images/termdashdemo_0_7_0.gif` (+0 -0) ➕ `doc/images/termdashdemo_0_9_0.gif` (+0 -0) ➕ `doc/images/textinputdemo.gif` (+0 -0) 📝 `internal/area/area.go` (+23 -0) 📝 `internal/area/area_test.go` (+85 -0) 📝 `internal/canvas/buffer/buffer.go` (+5 -0) 📝 `internal/canvas/buffer/buffer_test.go` (+12 -0) 📝 `internal/runewidth/runewidth_test.go` (+2 -2) 📝 `keyboard/keyboard.go` (+75 -2) 📝 `termdashdemo/termdashdemo.go` (+139 -60) 📝 `terminal/termbox/event.go` (+71 -131) 📝 `terminal/termbox/event_test.go` (+104 -98) ➕ `widgets/textinput/editor.go` (+417 -0) ➕ `widgets/textinput/editor_test.go` (+1813 -0) ➕ `widgets/textinput/options.go` (+265 -0) ➕ `widgets/textinput/textinput.go` (+377 -0) ➕ `widgets/textinput/textinput_test.go` (+1832 -0) ➕ `widgets/textinput/textinputdemo/textinputdemo.go` (+221 -0) </details> ### 📄 Description Fixes #65. Also: - adding a function that splits an area into two based on an absolute number of cells. - changing how keyboard events are processed, no longer translating multi-key shortcuts to multiple keyboard events. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-03 16:23:30 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/termdash#244
No description provided.