bugGNU Screen - Bugs: bug #28783, preselecting unexisting window...

 
 

bug #28783: preselecting unexisting window works but it should not

Submitter:  None
Submitted:  Sun 31 Jan 2010 02:09:08 PM UTC
   
 
Category:  Program Logic Severity:  3 - Normal
Priority:  * 5 - Normal Status:  Fixed
Privacy:  Public Assigned to:  None
Open/Closed:  Closed Release:  Cur Dev Sources
Fixed Release:  4.1.0 Planned Release:  4.1.0
Work Required:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Tue 16 Feb 2010 07:11:24 PM UTC, comment #1: 
Sadrul Habib Chowdhury <sadrul>
Group administrator
Sun 31 Jan 2010 02:09:08 PM UTC, original submission:  

if run

screen -p3 -X some-command

and there is no window #3, then some-command works and affects other window
it looks unexpected
in screen 4.03 it fails with "window required" message
it seems to me that 4.03 behavior is logically correct



this occurs because of this assignment


grep 'fore = windows.*sigh' socket.c -n -B1
1655-  if (!fore)
1656:    fore = windows;                /* sigh */

git annotate socket.c | grep 'fore = windows.*sigh' -B1
39563832        (Sadrul Habib Chowdhury 2008-08-30 17:20:12 -0400       1655)  if (!fore)
39563832        (Sadrul Habib Chowdhury 2008-08-30 17:20:12 -0400       1656)    fore = windows;                /* sigh */

git log 39563832 -n 1
commit 39563832bbeab0c4e9ccb5925e3af3062f3d5f64
Author: Sadrul Habib Chowdhury <sadrul@users.sourceforge.net>
Date:   Sat Aug 30 17:20:12 2008 -0400

    Use the last created window as foreground window

    Some commands don't work correctly if screen is started in daemon mode
    and not attached/detached at least once. This happens because without
    any attaches, no window is considered as the foreground window when
    remotely executing a command without a display. In such a case, treat
    the last created window as the foreground window, as suggested in
     #10074.


may be


if (!fore && !*mp->m.command.preselect)


?

Anonymous

 

(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 sadrul (Posted a comment)
  •  

    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 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2010-02-16 sadrul StatusNone Fixed
        Open/ClosedOpen Closed
        Fixed ReleaseNone 4.1.0
        Planned ReleaseNone 4.1.0

    Back to the top

    Powered by Savane 3.13-4b48.
    Corresponding source code