bugGNU Screen - Bugs: bug #22146, There is a (low) limit on the...

 
 

bug #22146: There is a (low) limit on the amount of %{-} can be used in a hardstatus/caption line.

Submitter:  Maarten Billemont <lhunath>
Submitted:  Mon 28 Jan 2008 03:35:18 PM UTC
   
 
Category:  Feature Request Severity:  2 - Minor
Priority:  * 5 - Normal Status:  Need Investigation
Privacy:  Public Assigned to:  None
Open/Closed:  Open Release:  None
Fixed Release:  None Planned Release:  Later
Work Required:  0 - Hours
* Mandatory Fields

Add a New Comment Rich Markup
   

Wed 05 Jan 2011 04:46:08 PM UTC, comment #5: 

I believe that this bug can be marked fixed (or at least fix-committed) as of this Git commit:

commit e6a28cf8bfdac15faa6c267bf476ddcaddf48d67
Author: Sadrul Habib Chowdhury <sadrul@users.sourceforge.net>
Date:   Tue Jan 26 15:17:26 2010 -0500

    Accommodate more color changes in the caption.

http://git.savannah.gnu.org/cgit/screen.git/commit/?id=e6a28cf8bfdac15faa6c267bf476ddcaddf48d67

Dustin Kirkland <kirkland>
Tue 07 Jul 2009 09:39:26 PM UTC, comment #4: 

The current Ubuntu patch changes it from 16 to 256:

diff -uprN screen-4.0.3.orig/screen.c screen-4.0.3/screen.c
--- screen-4.0.3.orig/screen.c  2003-09-08 09:26:41.000000000 -0500
+++ screen-4.0.3/screen.c       2009-01-10 12:06:34.698560196 -0600
@@ -2026,7 +2026,7 @@ static const char months[] = "JanFebMarA
 #endif
 
 static char winmsg_buf[MAXSTR];
-#define MAX_WINMSG_REND 16     /* rendition changes */
+#define MAX_WINMSG_REND 256    /* rendition changes */
 static int winmsg_rend[MAX_WINMSG_REND];
 static int winmsg_rendpos[MAX_WINMSG_REND];
 static int winmsg_numrend;

Dustin Kirkland <kirkland>
Sat 28 Mar 2009 03:52:39 PM UTC, comment #3: 

Ubuntu is carrying a trivial patch that is known to fix this.

See:


The simple patch is:

diff -uprN screen-4.0.3.orig/screen.c screen-4.0.3/screen.c
--- screen-4.0.3.orig/screen.c 2003-09-08 09:26:41.000000000 -0500
+++ screen-4.0.3/screen.c 2009-01-10 12:06:34.698560196 -0600
@@ -2026,7 +2026,7 @@ static const char months[] = "JanFebMarA
 #endif
 
 static char winmsg_buf[MAXSTR];
-#define MAX_WINMSG_REND 16 /* rendition changes */
+#define MAX_WINMSG_REND 80 /* rendition changes */
 static int winmsg_rend[MAX_WINMSG_REND];
 static int winmsg_rendpos[MAX_WINMSG_REND];
 static int winmsg_numrend;

Anonymous
Tue 15 Jul 2008 06:42:17 PM UTC, comment #2: 

Increasing MAX_WINMSG_REND might fix it here, but it seems to me that pushing and then popping a rendering attribute shouldn't result in any net impact on resources (other than the resulting buffer's length). I'm not familiar with the relevant code, though, so perhaps I'm missing something.

Micah Cowan <micahcowan>
Sun 01 Jun 2008 03:53:41 AM UTC, comment #1: 

vote++, because this is annoying! To fix this, set MAX_WINMSG_REND to a higher number than 16 in screen.c line 2088 or so.

Anonymous
Mon 28 Jan 2008 03:35:18 PM UTC, original submission:  

In the following:

hardstatus  alwayslastline  "%{= .r}1:Red%{= .g}2:Green%{-}3:Red%{= .g}4:Green%{-}5:Red%{= .g}6:Green%{-}7:Red%{= .g}8:Green%{-}9:Red%{= .g}10:Green%{-}11:Red%{= .g}12:Green%{-}13:Red%{= .g}14:Green%{-}15:Red%{= .g}16:Green%{-}17:Red%{= .g}18:Green%{-}19:Red%{= .g}20:Green%{-}21:Red%{= .g}22:Green%{-}23:Red%{= .g}24:Green%{-}25:Red%{= .g}26:Green%{-}27:Red%{= .g}28:Green"

'17:Red' and on will be colored green, not red as it should be.

Maarten Billemont <lhunath>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by kirkland (Posted a comment)
  • -email is unavailable- added by micahcowan (Updated the item)
  • -email is unavailable- added by lhunath (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 5 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2008-06-23 micahcowan CategoryNone Feature Request
        Severity3 - Normal 2 - Minor
        Planned ReleaseNone Later
        Work RequiredNone 0 - Hours
    2008-06-15 micahcowan StatusNone Need Investigation

    Back to the top

    Powered by Savane 3.13-cf05.
    Corresponding source code