1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

view in tab and focus follows mouse

Discussion in 'Support' started by David Marcus, Sep 11, 2011.

  1. David Marcus

    Joined:
    Jun 4, 2008
    Messages:
    648
    Likes Received:
    1
    VIEW in a tab (/w) doesn't get along with focus follows mouse (aka active window tracking; setting bit 0 of HKCU\Control Panel\Desktop\UserPreferencesMask to 1). Moving the mouse away from TCmd (almost always) makes the viewed file disappear. It reappears when I move the mouse back.

    TCC 13.00.19 Windows Vista [Version 6.0.6002]
    TCC 13.00.19 x64 Windows 7 [Version 6.1.7601]
     
  2. rconn

    rconn Administrator
    Staff Member

    Joined:
    May 14, 2008
    Messages:
    9,870
    Likes Received:
    83
    There's no way that VIEW in a tab window could work with "focus follows
    mouse". It's simply not possible to do in Windows.

    Think about what VIEW is actually doing -- it's trying to display a separate
    app (v.exe) overlaying a TCMD tab window, and shift the focus automatically
    when you move the mouse outside the v.exe window (for example, to the TCMD
    menus). When you're telling Windows to automatically change the focus, it's
    impossible for TCMD / VIEW to manage it.
     
  3. David Marcus

    Joined:
    Jun 4, 2008
    Messages:
    648
    Likes Received:
    1
    OK. That does sound impossible. I'll probably use LIST most of the time. I've already got a text editor that starts quickly and uses its own window, although I might find VIEW useful occasionally. Word wrap in LIST would be nice. Have you ruled out any enhancements to LIST or can I add it to the feedback?
     
  4. rconn

    rconn Administrator
    Staff Member

    Joined:
    May 14, 2008
    Messages:
    9,870
    Likes Received:
    83
    It's unlikely anything will be added to LIST in the future, but you can
    always ask!
     
  5. Charles Dye

    Charles Dye Super Moderator
    Staff Member

    Joined:
    May 20, 2008
    Messages:
    3,312
    Likes Received:
    39
    LIST reads from standard input, so you can always pipe through a word-wrap filter into LIST.
     
  6. David Marcus

    Joined:
    Jun 4, 2008
    Messages:
    648
    Likes Received:
    1
    Which assumes I know before I've viewed the file that I want it word-wrapped, I won't change my mind want it not word wrapped, I have a word wrap filter (do I? which one do you use?), and I tell the filter how wide the TCC window is. If I'm going to all that trouble, I can just view the file in my editor.
     
  7. Charles Dye

    Charles Dye Super Moderator
    Staff Member

    Joined:
    May 20, 2008
    Messages:
    3,312
    Likes Received:
    39
    Well, yes. Personally if I don't like LIST's display I don't mind popping out and composing a new command line, but I guess I can't speak for everybody.
     
  8. David Marcus

    Joined:
    Jun 4, 2008
    Messages:
    648
    Likes Received:
    1
    It is a good idea. I could create an alias. What do you use to do word wrap? Maybe sed can do it?
     
  9. David Marcus

    Joined:
    Jun 4, 2008
    Messages:
    648
    Likes Received:
    1
    Looks like cygwin's fold command will do it.
     
  10. Charles Dye

    Charles Dye Super Moderator
    Staff Member

    Joined:
    May 20, 2008
    Messages:
    3,312
    Likes Received:
    39
    Or awk, or a Windows port of fold. There must be others out there -- a little googling finds source for one called 'fwrap', though it's not quite what I had in mind. Or roll your own. I'm using one of my own creation, though it's ideosyncratic and might not be to your taste; I designed it for English prose rather than program output and it makes various assumptions.
     
  11. David Marcus

    Joined:
    Jun 4, 2008
    Messages:
    648
    Likes Received:
    1
    This seems to work with Cygwin:

    fold -s -w %_columns %@quote[%1] | list
     

Share This Page