fix: close osc8 exitUrl correctly#792
Conversation
|
The intention here was to emit only a single OSC spanning multiple cells... we only "close" it when we reach the end of the URL. I don't think this change is correct. |
gdamore
left a comment
There was a problem hiding this comment.
This isn't right... can you explain what you're trying to solve?
|
I looked at the downstream bug. I think the analysis there is probably incorrect. |
|
lazygit never use url so it's always "". (jesseduffield/lazygit#4421 (comment)) So the problem here is exitUrl should only be emited when we have enterUrl. |
defdab8 to
ea78599
Compare
|
Done now (forgot to rebase before) |
|
Wait. the logic in windows looks a bit different. I'll look it again |
Co-authored-by: stk <stk@ableton.com>
|
Ok I'm not sure what happened here, on style change: it write last style rather than the current one. Lines 1052 to 1056 in 17ca208 while in tscreen.go it write current style (not the last style). ~So if this is a typo I can correct it but I would guess it's probably not again... EDIT: it's not a typo according the comment. |
|
The idea of the "lastStyle" was to ensure that we flush any unwritten changes when changing style. The whole idea is to reduce system call overhead by batching. |
|
What happened to the windows implementation? I'm surprised that this got merged when it still doesn't work on Windows. @gdamore It looks like the Windows implementation is sufficiently different from tScreen that the same approach of using curstyle isn't easily possible. I briefly looked into making the cScreen implementation more similar to tScreen in this regard, but there are too many things in the code that I don't understand, so I didn't feel comfortable suggesting that. It looks like for Windows we do have to go with the urlOpen variable approach, unless we totally want to refactor the logic. |
Trying to fix emiting redundant osc8 (which I found in lazygit jesseduffield/lazygit#4421).
Sorry if I misunderstand something (since this pattern repeat twice... both in linux and windows), but I think the "exiturl" part should be closed immediately?