-
-
Notifications
You must be signed in to change notification settings - Fork 607
whitespace at end of line in commit msg eats cursor #247
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I think I understand where this might be coming from. I believe the building of the output of a TextInput component mixes the styling and content to a point where the above issue can occur. As part of #197 I am partway through refactoring how TextInput builds up the Text return value. Where the String containing the characters and the styling are built up in stages. See this branch. My changes are currently broken with regards to an existing test and UTF-8 (the carriage return symbol). Once that is sorted I'll write another test for the above scenario to see if the issue has been solved as part of my changes. |
I'm not very familiar with the project but I'd like to try to fix the issue. |
@edfloreshz I think @ciaranmooney is working on this already, please make sure to checkout his branch first, so we don't have two people fixing the same issue :) |
@edfloreshz Indeed, I believe my refactor of the TextComponent will remove this issue (see my branch). Although I haven't tested it yet. I've got my head around how the area is working so I feel well placed to solve this issue. |
Okay, thanks for letting me know @ciaranmooney @extrawurst! 🙂 |
@ciaranmooney is this still coming in at some point? maybe other might want to look into this particular issue until then so we can clear it for |
I am afraid I will have to concede defeat to this issue and allow others to take a crack at it. |
can you explain what the bug is, I dont see it |
On the screenshots you can see that the underscore indicating the cursor position disappears when under a space at the end of a line |
how did you get that new line in there? And I have no cursor when typing only when backtracking (left / right arrow), is that right? |
You can use the external editor to get linebreaks in there. If you do not see the underscore you see the bug :) |
got it, let me tackle this - i suspect its a tui issue |
as i suspected this is a tui bug, I have filed a bug with them and a solution when they fix it the trailing " " character needs to be a trailing NBSP character
there is a simple work round for gitui, which is to use a '_' character instead of a space at the end of the line while editing. This looks slightly odd because the underline character is slightly different to the underline of a space. But its barely noticeable. You want a PR for that? It means there is an always visible cursor which is nice. The alternative is to turn of text wrap but I dont think thats a good idea. |
move cursor one left:

The text was updated successfully, but these errors were encountered: