Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Newline does not work as expacted #117

Closed
mcDandy opened this issue Sep 15, 2024 · 8 comments
Closed

Newline does not work as expacted #117

mcDandy opened this issue Sep 15, 2024 · 8 comments
Assignees
Labels
bug Something isn't working

Comments

@mcDandy
Copy link

mcDandy commented Sep 15, 2024

I opened a new windows terminal and made sure oterm is not running anywhere else before.
I am running oterm 0.5.2
Problems:

  1. Clicking newline in multiline mode places newline in the wrong place (from second line onwards)

  2. Pressing shift+enter sends data to ollama

  3. newline position problems
    a. Happens only on and after second line. Did not find what are the rules of placement of newline
    b. Does not matter if ascii or unicode is used.

Uryvek.1.mp4
@ggozad ggozad self-assigned this Sep 16, 2024
@ggozad ggozad added the bug Something isn't working label Sep 16, 2024
@ggozad
Copy link
Owner

ggozad commented Sep 16, 2024

I am away for a short holiday, but I can confirm this is an issue. Will fix asap.

@ggozad ggozad closed this as completed in 16457bd Sep 22, 2024
ggozad added a commit that referenced this issue Sep 22, 2024
Fix newline insertion in multi-line widget. Closes #117
@danyalaytekin
Copy link

Shift enter is still submitting the message for me here on macOS with v0.6.4. I don't think it did this until I upgraded to 0.6 recently.

@ggozad ggozad reopened this Sep 30, 2024
@ggozad
Copy link
Owner

ggozad commented Sep 30, 2024

@danyalaytekin Can you please let me know which terminal you use? It works fine for me on iTerm.
Also, are you in multi-line mode when you press shitft+enter?

@danyalaytekin
Copy link

danyalaytekin commented Sep 30, 2024

Hi @ggozad, this was in the stock macOS 14.6.1 terminal. I've just tested in iTerm too. I should probably switch over entirely but it has never quite caught on... anyway, my results:

mode Terminal iTerm Kitty
normal submits nothing happens nothing happens
multiline submits newline newline

@jim-at-jibba
Copy link

I found a similar issue. It works fine in Kitty with no multiplexer.
But in Kitty with tmux is submits and in Wezterm it also submits.

Thanks

@ggozad
Copy link
Owner

ggozad commented Oct 6, 2024

Thank you all for reporting how this works across environments.
I believe fixing this properly is unfeasible as I have to rely on textual's handling of keys and my guess is that it is difficult to do it properly across varied environments.
An alternative would be to allow configurable keymaps. This was introduced in the latest textual release a few days back, I am gonna investigate whether it's a good alternative.
If there are any takers: https://darren.codes/posts/textual-keymaps/

@ggozad
Copy link
Owner

ggozad commented Oct 11, 2024

#131 allows customizations to key bindings. See the README for how to do that.
If this works for you, I will release asap.

@ggozad ggozad closed this as completed in 181813a Oct 12, 2024
@IvanTurgenev
Copy link

had to use ctrl+enter, on nixos tmux alacritty

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants