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

see whether we can kill query spill by disabling echo #2019

Closed
dankamongmen opened this issue Aug 3, 2021 · 12 comments
Closed

see whether we can kill query spill by disabling echo #2019

dankamongmen opened this issue Aug 3, 2021 · 12 comments
Assignees
Labels
enhancement New feature or request question/research Further information is requested
Milestone

Comments

@dankamongmen
Copy link
Owner

Just had an inspiration...we're plagued by terminals which fail to consume entire escapes. See, for instance, Konsole in #1888. What happens if we just disable echo for the duration of the query send? Will that prevent such unconsumed controls from showing up on the display, while allowing the others to continue to reach the terminal? If so, that ought provide a general solution to this annoyance!

@dankamongmen dankamongmen added enhancement New feature or request question/research Further information is requested labels Aug 3, 2021
@dankamongmen dankamongmen added this to the 3.0.0 milestone Aug 3, 2021
@dankamongmen dankamongmen self-assigned this Aug 3, 2021
@dankamongmen
Copy link
Owner Author

Alas, this does not appear to work.

However, a Second Idea: we're already throwing a u7 in the query string. Why not lead with u7, so that the cursor position reported is clean of any query spill? We could then always move back to that position, or throw a u7 in at the end as well, and move only if there was a difference. I don't see much point in the latter, though. Let's try that out.

@dankamongmen
Copy link
Owner Author

works perfectly =] w000000000t! nice!

@dankamongmen
Copy link
Owner Author

before: (note the cp at the very beginning)

2021-08-03-173912_884x1417_scrot

after:
2021-08-03-173937_884x1417_scrot

@dankamongmen
Copy link
Owner Author

Terminal.App befrore/after

2021-08-03-174356_1850x1289_scrot
2021-08-03-174409_1850x1289_scrot

@dankamongmen
Copy link
Owner Author

yay! this is a completely general solution for a long-time and varied annoyance! oh, happy happy day!

@dankamongmen
Copy link
Owner Author

however, this isn't going to apply as written to anything but the new CLI mode. direct mode and pure rendered mode still suffer from the problem. i'd think the thing to do is to move the goto_location() from notcurses_core_init() to interrogate_terminal().

@dankamongmen
Copy link
Owner Author

hrmmmm except goto_location() wants a notcurses*, erp!

@dankamongmen
Copy link
Owner Author

this is too sweet to give up on. alright, what we're gonna do is make goto_location() source-independent. merge it with the ncdirect variant. we might have to merge some state between the two; that's fine, shove it into tinfo, that's what it's there for.

@dankamongmen
Copy link
Owner Author

ugh this is gonna stomp all over the dankamongmen/fauxmemstream branch though =[

@dankamongmen
Copy link
Owner Author

no, ncdirect_cursor_move_yx() and goto_location() are just too fundamentally different. duplicate the check to ncdirect, and check for !inhibit_banner in rendered mode.

@dankamongmen
Copy link
Owner Author

confirmed fix for direct mode

@dankamongmen
Copy link
Owner Author

confirmed fix across all modes

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
enhancement New feature or request question/research Further information is requested
Projects
None yet
Development

No branches or pull requests

1 participant