<ovf>
dnkl: if i enable insertion replacement mode (\e[4h), then pasting unicode stuff starts to behave weird (i.e. i get a lot of different flags when pasting a single pirate one). is this expected?
<ovf>
maybe i misunderstood what this mode does, but it seems to do what i want (to behave like the normal text insertion)
<ovf>
without it i'll have to reimplement insertion myself, i.e. redraw the line after the cursor
<dnkl>
ovf: insertion mode is very rarely used, and not as well tested as the normal mode. There are likely bugs
<ovf>
ok! i'll just reimplement it myself then. if it's rarely used in foot, it's likely rarely used elsewhere, and ultimately i want my code to work everywhere
<dnkl>
ovf: if you have simple test cases (e.g printf one-liners), by all means, open an issue
<dnkl>
yeah... but less ping/pong with all the standard questions. People in general are terrible bug reporters ;)
<dnkl>
ovf: ah, ok, so, this particular issue is that, since all of the codepoints "append" to the previous one, the cursor is moved back to the previous cell. When the insert logic runs, everything from the cursor and on is memmove:d one cell to the right. This means the last flag-codepoint is copied to the next cell, leading to a string of emojis
<ovf>
...which is, unsurprisingly, exactly the issue my naive client-side reimplementation had. :-)
boomboxnation has quit [Read error: Connection reset by peer]
birdisword has quit [Ping timeout: 245 seconds]
boomboxnation has joined #foot
birdisword_ has joined #foot
birdisword_ is now known as birdisword
boomboxnation has quit [Read error: Connection reset by peer]
boomboxnation has joined #foot
birdisword_ has joined #foot
jramsay has joined #foot
boomboxnation-1 has joined #foot
rcf1 has joined #foot
rcf has quit [Killed (NickServ (GHOST command used by rcf1))]
birdisword has quit [Ping timeout: 252 seconds]
boomboxnation has quit [Ping timeout: 252 seconds]
MyNetAz has quit [Ping timeout: 252 seconds]
chilledfrogs has quit [Ping timeout: 252 seconds]
lack has quit [Ping timeout: 252 seconds]
birdisword_ is now known as birdisword
rcf1 is now known as rcf
boomboxnation-1 has quit [Read error: Connection reset by peer]
boomboxnation has joined #foot
beerman has quit [Remote host closed the connection]
MyNetAz has joined #foot
hexa- is now known as h
boomboxnation has quit [Read error: Connection reset by peer]
boomboxnation has joined #foot
ollysmith_ has joined #foot
beerman has joined #foot
ollysmith has quit [Ping timeout: 248 seconds]
beerman has quit [Ping timeout: 244 seconds]
<krobelus>
so the sane way to query the terminal is to do a blocking wait (on Primary DA response). Some people are suggesting adding a timeout which seems wrong, I'd rather work around / fix the broken terminals. Not sure what other querying programs do
<krobelus>
even the most plain terminals respond to Primary DA; so far I've only found Midnight Commander and dvtm that don't (to be fixed easily)
<rockorager>
krobelus: I put a 1 second timeout
<rockorager>
I forgot which terminal I’ve encountered that doesn’t respond…
<rockorager>
notcurses has good notes on it
<rockorager>
I think st?
<krobelus>
I'm fine with adding such a timeout (though I've had >1s ping at times) but it should cover up the need to fix terminals. If we fix them, future users will get by without timeout.
<krobelus>
rockorager: that's in libvaxis right?
<rockorager>
yeah
<rockorager>
I agree about fixing broken terminals
<krobelus>
rockorager: where's the notcurses docs? I'm reading through some of their issues
beerman has joined #foot
<krobelus>
ah, TERMINALS.md
<rockorager>
I wonder if you the broken ones respond to DSR (Ps=5)
<rockorager>
you could do a DSR and a DA1 and break on either
<krobelus>
> if a terminal does *not* reply in a recognizable way to Primary Device Attributes, `notcurses_init()` will hang