Skip to content

Conversation

losnappas
Copy link
Contributor

Can we add this, so I can deduce from elsewhere what got painted last

@krobelus
Copy link
Contributor

krobelus commented May 4, 2025

why do you need to deduce that? It should already be implied by the hook ordering you defined?
i.e. when you call ansi-enable versus other hooks

@losnappas
Copy link
Contributor Author

I need it for repls, like described in https://discuss.kakoune.com/t/kakoune-repl-buffer-a-new-way-to-work-with-repls/1435/7

if the cursor is after the end of the last chunk, all the text from the end of the chunk up to the cursor is sent to the REPL as input

To track the end of the last chunk, after any BufReadFifo renders more ansi encoded characters.

@eraserhd
Copy link
Owner

eraserhd commented May 5, 2025

I'm not sure you really need this, but I'm OK with it.

Beware that there are currently issues if escape sequences get split between chunks. The state currently gets lost at the end of the chunk, so the next chunk starts out visible even if it is a continuation of an escape sequence.

@eraserhd eraserhd merged commit ef6e153 into eraserhd:develop May 5, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants