Re: [dev] [sandy] [st] Title incorrectly shown if TERM=st

2015-10-15 Thread Roberto E. Vargas Caballero
> hmm, it was originally added with
> b2db58c2a05168257ee4e4b941f0533c6dde2a10 to make the window title the
> status line.
> The window title does become the status line, but sandy keeps spitting
> stuff out while I'm editing, so I'll take a printed terminal status
> line over spittle.
> Is there another app that uses the status line terminal capability
> ("hs" in terminfo) so I can test it?
> I don't know enough ncurses to whip up a test.

Today is common to set the title of your terminal with
the shell prompt, althought in this case ppl usually hardcode
the sequence in PS1.


Regards,



Re: [dev] dmenu segfaults when pressing control+enter without a selection

2015-10-15 Thread Matthew of Boswell
On Thu, 15 Oct 2015 18:08:20 -0400
Matthew of Boswell  wrote:

> Fix attached.

Nevermind... I didn't know that dmenu was on git.suckless.org...
There's no reference to its git repository on the main suckless.org
website. Looks like this segfault was fixed last year on the master
branch...

By the way... shouldn't there be a newer release of dmenu? Most distros
don't package the git version.

-- 
Matt Boswell

()  ascii ribbon campaign - against html e-mail 
/\  www.asciiribbon.org   - and proprietary attachments



[dev] dmenu segfaults when pressing control+enter without a selection

2015-10-15 Thread Matthew of Boswell
Hello,

I found this bug while accidentally pressing control+enter when I did a
quick control+y+enter for opening pages in surf. After doing this
dozens of times per day, I tracked down what was causing it.

Fix attached.

-- 
Matt Boswell--- dmenu_old.c	2015-10-15 17:49:27.521943292 -0400
+++ dmenu.c	2015-10-15 17:49:20.355108883 -0400
@@ -370,7 +370,7 @@
 		puts((sel && !(ev->state & ShiftMask)) ? sel->text : text);
 		if(!(ev->state & ControlMask))
 			exit(EXIT_SUCCESS);
-		sel->out = True;
+		if (sel) sel->out = True;
 		break;
 	case XK_Right:
 		if(text[cursor] != '\0') {


Re: [dev] [sandy] [st] Title incorrectly shown if TERM=st

2015-10-15 Thread shua lloret
Seems like the output wasn't flushing correctly.
Created a patch that manually flushes after setting the title which
fixes it for me, though I'm wary that this is just some terminal
setting that should be turned on/off.

-shuall

On Thu, Oct 15, 2015 at 4:08 AM, Roberto E. Vargas Caballero
 wrote:
>> hmm, it was originally added with
>> b2db58c2a05168257ee4e4b941f0533c6dde2a10 to make the window title the
>> status line.
>> The window title does become the status line, but sandy keeps spitting
>> stuff out while I'm editing, so I'll take a printed terminal status
>> line over spittle.
>> Is there another app that uses the status line terminal capability
>> ("hs" in terminfo) so I can test it?
>> I don't know enough ncurses to whip up a test.
>
> Today is common to set the title of your terminal with
> the shell prompt, althought in this case ppl usually hardcode
> the sequence in PS1.
>
>
> Regards,
>
From ba3786702c4a99a6b910bc81a61eb153ae2a5396 Mon Sep 17 00:00:00 2001
From: shuall 
Date: Thu, 15 Oct 2015 12:31:03 -0400
Subject: [PATCH] fix title not updating on terms with "hs" capabilities (st)

---
 sandy.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/sandy.c b/sandy.c
index d08b683..65b936d 100644
--- a/sandy.c
+++ b/sandy.c
@@ -1971,6 +1971,7 @@ i_update(void) {
 		putp(tsl_str);
 		putp(title);
 		putp(fsl_str);
+		fflush(NULL);
 	}
 
 	/* Clean global dirty bits */
-- 
2.6.1