Re: [hackers] [st][PATCH] Add support for DSR response "OK" escape sequence

2023-02-06 Thread Santtu Lakkala
On 6.2.2023 1.39, Adam Price wrote: tsetattr(csiescseq.arg, csiescseq.narg); break; - case 'n': /* DSR – Device Status Report (cursor position) */ - if (csiescseq.arg[0] == 6) { + case 'n': /* DSR – Device Status Report */ +

Re: [hackers] [sbase][PATCH 1/2] libutil: Implement a simple yes/no prompt

2022-11-25 Thread Santtu Lakkala
On 20.11.2022 16.58, Tom Schwindl wrote:> I don't quite get why there is a variable argument list instead of just using a single argument which contains the prompt. I can't see the need for formatting in a y/n prompt. I also wouldn't use `nomsg' since it just polutes stderr. The specification

Re: [hackers] [sbase][PATCH 2/2] cp, mv, rm: Add `-i` for confirmation prompts

2022-11-25 Thread Santtu Lakkala
On 19.11.2022 23.46, Alan Potteiger wrote: diff --git a/mv.c b/mv.c index 8441f9c..51efde5 100644 --- a/mv.c +++ b/mv.c @@ -49,6 +57,9 @@ main(int argc, char *argv[]) ARGBEGIN { case 'f': break; +case 'i': +mv_iflag = 1; +

Re: [hackers] [st][PATCH] Fix buffer overflow when handling composed input

2022-10-24 Thread Santtu Lakkala
On 24.10.2022 13.01, NRK wrote:> But which approach to take is the maintainer's call, not mine. I've attched both fixed-size and dynamic-allocation patch (but simplified without goto). The dynmaic[sic] version incorrectly passes sizeof(buf), where buf is char *, as the size of buffer in the

Re: [hackers] [dmenu][PATCH] insert: use long instead of ssize_t

2022-09-05 Thread Santtu Lakkala
On 2.9.2022 23.38, NRK wrote: `ssize_t` is bit of an exotic type. by POSIX, it's only guaranteed to be able to hold {-1, SSIZE_MAX} [0], meaning that negative values less than -1 isn't guaranteed to representable in `ssize_t` (though it works out in practice). by default `ctrl+u` will call

Re: [hackers] [dmenu] tab-complete: figure out the size before copying || NRK

2022-09-02 Thread Santtu Lakkala
On 2.9.2022 14.01, g...@suckless.org wrote: commit 528d39b011afb7ef6fd794ba6b74155d4e69bc68 dmenu.c b/dmenu.c index 969f6d8..6b285df 100644 --- a/dmenu.c +++ b/dmenu.c @@ -517,9 +517,9 @@ insert: case XK_Tab: if (!sel) return; -

[hackers] [PATCH] strings: Correctly handle non-UTF-8 data

2022-09-01 Thread Santtu Lakkala
Make fgetrune() put the breaking byte back, if it was not the only one read, as this may be the start of the next, valid, rune. Also consider erroneous runes to break a valid sequence, otherwise there will be false-positive matches. --- libutf/fgetrune.c | 3 +++ strings.c | 4 +--- 2

Re: [hackers] [dwm][PATCH] Update monitor positions also on removal

2022-04-10 Thread Santtu Lakkala
On 9.4.2022 13.51, Hiltjo Posthuma wrote: I've heard similar reports with monitor plugging and unplugging not working nicely. Can someone test this patch and report back these conditions or if it improves things? FWIW I've been using this change ever since I submitted it, and plug and

[hackers] [dwm][PATCH] Update monitor positions also on removal

2022-02-21 Thread Santtu Lakkala
When monitors are removed, the coordinates of existing monitors may change, if the removed monitors had smaller coordinates than the remaining ones. Remove special case handling so that the same update-if-necessary loop is run also in the case when monitors are removed. --- dwm.c | 68

[hackers] [st][PATCH] Delay redrawals on palette changes

2022-02-17 Thread Santtu Lakkala
Build on auto-sync and only mark window dirty on palette changes and let the event handler do the actual draw. --- st.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/st.c b/st.c index 51049ba..c71fa06 100644 --- a/st.c +++ b/st.c @@ -1927,7 +1927,7 @@ strhandle(void)