AnthonyDiGirolamo / todotxt-machine

an interactive terminal based todo.txt file editor with an interface similar to mutt
https://pypi.python.org/pypi/todotxt-machine/
GNU General Public License v3.0
244 stars 37 forks source link

Home/End not working as expected when word wrap is enabled #30

Closed ojdo closed 8 years ago

ojdo commented 8 years ago

When I edit a todo item with word wrap enabled, both the Ctrl-A/E as well as Home/End keys do not bring me to the beginning or the end of the item, but only to the beginning or end of the current visual line. So I do not see a quick way to bring the cursor to the beginning of a long todo item. Are there any workarounds that I miss?

More context: I am using todotxmachine on a Ubuntu machine, that I access through tmux via mosh from a Windows machine within cygwin. What could possibly go wrong?

kespindler commented 8 years ago

Interesting. I'm using iTerm2 on my Mac and it's working fine. (I'm on my fork but that functionality is the same.)

Did you have a chance to poke around and fix this? I wonder if this is related to the text-reflow problem in linux terminals.

ojdo commented 8 years ago

Follow-up: Home/End work as expected in a :set wrap linebreak nolist-wrapping vim instance. So the keypresses should arrive properly at the host machine. Do you have any gist as where in the codebase (yours, urwid, ...) I could hope for creating a fix? Your repo seems to rely on urwid completely for drawing the text edit, right?

ojdo commented 8 years ago

I think this can be closed with PR #31 having been merged.