URL:
  <http://savannah.gnu.org/bugs/?28783>

                 Summary: preselecting unexisting window works but it should
not
                 Project: GNU Screen
            Submitted by: None
            Submitted on: Sun 31 Jan 2010 02:09:08 PM UTC
                Category: Program Logic
                Severity: 3 - Normal
                Priority: 5 - Normal
                  Status: None
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open
         Discussion Lock: Any
                 Release: Cur Dev Sources
           Fixed Release: None
         Planned Release: None
           Work Required: None

    _______________________________________________________

Details:

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 <sad...@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)


?





    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?28783>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/



Reply via email to