[PR #171] [CLOSED] Allow left and right movement within inputfield #866

Closed
opened 2026-03-04 01:08:18 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/rivo/tview/pull/171
Author: @asacainbbc
Created: 10/8/2018
Status: Closed

Base: masterHead: master


📝 Commits (10+)

  • 36f2a6e Allow moving cursor around text
  • 16daac3 Correct bounding index
  • 501ef25 Skip further layout tests if input is empty
  • 4f2f703 Default behaviour if string is empty
  • 94cc7e9 Correct bounds
  • dc2a1fa Bounds correcting
  • a33c665 Check length before trying to index
  • e225fca Fix slice bounds out of range
  • 27f01b2 More bounds checking
  • 673bad8 Stop trying to find cursor position via field width

📊 Changes

2 files changed (+77 additions, -36 deletions)

View changed files

📝 inputfield.go (+65 -36)
📝 util.go (+12 -0)

📄 Description

I've patched inputfield.go to allow left and right movement and editing the input's text from the cursor's position. This is my first patch for this codebase so I'm sure it's not up to scratch but I'm 100% happy to make changes and resubmit.


🔄 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/rivo/tview/pull/171 **Author:** [@asacainbbc](https://github.com/asacainbbc) **Created:** 10/8/2018 **Status:** ❌ Closed **Base:** `master` ← **Head:** `master` --- ### 📝 Commits (10+) - [`36f2a6e`](https://github.com/rivo/tview/commit/36f2a6e92435b48454b06a0b1b42d68bcc057b30) Allow moving cursor around text - [`16daac3`](https://github.com/rivo/tview/commit/16daac31c91842dfa2728b5a4c8a307788edd766) Correct bounding index - [`501ef25`](https://github.com/rivo/tview/commit/501ef25f8c7775eaefce7cc674ec18ca9dcb754f) Skip further layout tests if input is empty - [`4f2f703`](https://github.com/rivo/tview/commit/4f2f703c8a765b190249fec2c258dc43164227c3) Default behaviour if string is empty - [`94cc7e9`](https://github.com/rivo/tview/commit/94cc7e96278c2c331510657d6063a4168d290f3d) Correct bounds - [`dc2a1fa`](https://github.com/rivo/tview/commit/dc2a1fac5939956e3f3498ec893a1c48179272cd) Bounds correcting - [`a33c665`](https://github.com/rivo/tview/commit/a33c665e035cbbbdb41fc8ca31f873fa6dba8345) Check length before trying to index - [`e225fca`](https://github.com/rivo/tview/commit/e225fca477eb12589242a649e176fabcc807b859) Fix slice bounds out of range - [`27f01b2`](https://github.com/rivo/tview/commit/27f01b237c7d70851b5010dc2bf3be2edca0b823) More bounds checking - [`673bad8`](https://github.com/rivo/tview/commit/673bad8db6fc1688894c8595dcd28f2cc7658d41) Stop trying to find cursor position via field width ### 📊 Changes **2 files changed** (+77 additions, -36 deletions) <details> <summary>View changed files</summary> 📝 `inputfield.go` (+65 -36) 📝 `util.go` (+12 -0) </details> ### 📄 Description I've patched inputfield.go to allow left and right movement and editing the input's text from the cursor's position. This is my first patch for this codebase so I'm sure it's not up to scratch but I'm 100% happy to make changes and resubmit. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-04 01:08:18 +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/tview#866
No description provided.