question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

determine when isWrapped should be reset to false

See original GitHub issue

We set isWrapped to true for a buffer line, once the text overflows right side in wrapAround mode in InputHandler.print.

We should define circumstances, when this settings has to be reset to the default value of false. Currently there are a few bug reports associated with this: #1710, #1713 and a partial fix in #1720.

Proposed behavior:

  • keep isWrapped as long as possible
  • reset it to false once the following happens:
    • a horizontal resize event: Currently we dont support reflow on resize, therefore isWrapped will not reflect the correct line wraps anymore upon horizontal resize. It should simply set all isWrapped to false. Would cover #1713.
    • some cells of a line got changed by cursor repositioning: This is a tricky one since the intention of changing the old content is not clear. I think as soon as anything gets changed by repositioning the cursor the terminal is used in a more advanced manner and we should also reset isWrapped to false making them single content lines. Would cover #1710 and #1720.

Up for discussion @Tyriar, @mofux, @bgw

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:14 (10 by maintainers)

github_iconTop GitHub Comments

1reaction
Tyriarcommented, Oct 5, 2018

a horizontal resize event: Currently we dont support reflow on resize, therefore isWrapped will not reflect the correct line wraps anymore upon horizontal resize. It should simply set all isWrapped to false. Would cover #1713.

I don’t think we should touch isWrapped here, the fix I had in mind of #1713 was to special case it until we have reflow in place.

1reaction
egmontkobcommented, Oct 2, 2018

I think as soon as anything gets changed by repositioning the cursor the terminal is used in a more advanced manner and we should also reset isWrapped to false

I’m afraid it might be too much.

The use case that occurs to me is bash (readline), zsh and friends. The nice user-friendly behavior is if the command line being edited isWrapped (all lines except the last). There are various ways of editing a part of a line that doesn’t require a full repaint, e.g. Ctrl+T for transposing two adjacent characters. I checked bash-4.4 now and it doesn’t reprint the entire line, only the two letters that swap places. Yet the command being typed should remain isWrapped.

In VTE we made it behave roughly like xterm does (roughly == I’m not aware of any difference but we didn’t do a thorough check so there easily might be), and the cases where the flag is reset are surprisingly few. Clear screen (or a part of the screen, then obviously for those lines only), clear to end of line, delete char (but surprisingly not at insert char), new line appearing due to scrolling (perhaps with a scroll region defined). Taking a quick look at our source code, I think this is all.

xterm doesn’t do rewrapping either, but doesn’t alter this flag on horizontal resize. A double/triple click still selects multiple lines at once. The newly added cells on the right are “unused” ones, skipped when copy-pasting.

Read more comments on GitHub >

github_iconTop Results From Across the Web

clear command doesn't reset isWrapped status of buffer lines · Issue ...
Cleared terminal lines should have isWrapped reset #1720 ... determine when isWrapped should be reset to false #1723.
Read more >
What is the purpose of the IsWrapped property in WCF
Set the value of IsWrapped to false to suppress the wrapper element into which the message body is serialized.
Read more >
purrr 0.3.0 - Tidyverse
This function is applied on elements for which the predicate is FALSE . map_at() now accepts vars() selections. This lets you use selection ......
Read more >
Troubleshooting BitLocker boot errors on an Azure VM
Learn how to troubleshoot BitLocker boot errors in an Azure VM.
Read more >
useFormState - Simple React forms validation
Will remain true until the reset method is invoked. isSubmitSuccessful, boolean. Indicate the form was successfully submitted without any Promise rejection or ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found