bugGNU Screen - Bugs: bug #23719, [patch] row/column report escape...

 
 

bug #23719: [patch] row/column report escape sequence

Submitter:  Micah Cowan <micahcowan>
Submitted:  Fri 27 Jun 2008 05:38:14 AM UTC
   
 
Category:  Feature Request Severity:  3 - Normal
Priority:  * 5 - Normal Status:  Confirmed
Privacy:  Public Assigned to:  None
Open/Closed:  Open Release:  None
Fixed Release:  None Planned Release:  Later
Work Required:  None
* Mandatory Fields

Post a Comment

Add a New Comment Rich Markup
   

Discussion

Fri 27 Jun 2008 05:38:14 AM UTC, original submission:  

From the mailing list:

I've noticed that screen doesn't implement a potentially useful escape sequence that allows the client to query the window size.  (At least not in 4.0.2, which is the latest release version on the ftp site.)  I'm not sure how standard this sequence is, but it's implemented by xterm, dtterm, gnome terminal, and probably others.

I added support to my local copy by adding a few lines to ansi.c.  In case anyone is interested, I've attached the patch.

One reference I've found for this "CSI 18 ; t" sequence is here:
http://rtfm.etla. ... 20Ps%20;%20Ps%20t

David


diff -Nru screen-4.0.2.orig/ansi.c screen-4.0.2/ansi.c
--- screen-4.0.2.orig/ansi.c        2003-12-05 06:57:05.000000000 -0700
+++ screen-4.0.2/ansi.c        2008-06-26 22:25:26.000000000 -0600
@@ -1225,6 +1225,11 @@
           SaveCursor();
           break;
         case 't':
+          if (a1 == 18) {
+            /* report the window size */
+            Report("\033[8;%d;%dt", curr->w_height, curr->w_width);
+            break;
+          }
           if (a1 != 8)
             break;
           a1 = curr->w_args[2];


(In answer to the question of "how standard"; it couldn't be officially standard, as t (7/5) falls under the "Private Use" final bytes for CSI sequences. -mjc)

Micah Cowan <micahcowan>

 

Attached Files

This item currently has no attached files.

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

Attach Files:
   
   
Comment:
   

 

Dependencies

This item does not depend on any other items.

No items depend on this one.

 

Mail Notification Carbon-Copy List

Carbon-Copy List
  • -email is unavailable- added by micahcowan (Submitted the item)
  •  

    Votes

    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.

     

    History

    Follows 1 latest change.

    Date Changed by Updated Field Previous Value => Replaced by
    2008-08-09 micahcowan StatusNeed Discussion Confirmed

    Back to the top

    Powered by Savane 3.16-ed84.
    Corresponding source code