gcla / gowid

Compositional widgets for terminal user interfaces, written in Go, inspired by urwid.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Return does not jump to the next line in the editor

xyproto opened this issue · comments

Steps to reproduce:

  1. Clone the latest master of gowid
  2. Enter the gowid-editor example
  3. go build
  4. touch test.txt
  5. Resize the terminal window to be relatively narrow (ie. 60 characters wide)
  6. Run ./gowid-editor test.txt
  7. Press return and watch the cursor move 1 to the right.
  8. Press return again and watch the cursor jump 1 line down and then not at the beginning of the next line, but 1 position to the right.
  9. Press backspace and watch the cursor jump 1 line up.
  10. Press backspace and watch the cursor jump 1 position to the left.

I'm using konsole on Arch Linux.

Thanks for the report, and ugh, sorry for the crummy bug!

I've pushed a new branch to github called widerunes - its purpose was to fix some issues with runes that require more than one terminal character to display, but it also fixes some bad behavior in the edit widget. Could you give that branch a go? Your instructions above would apply except add step

1.5. git checkout widerunes

I've merged some changes back to master which I think fix this issue. Please do re-open if it still occurs.