#132 MV's cloned windows

open
nobody
None
5
2005-04-11
2005-04-11
TK Soh
No

This is a port of Max Vohlken's window cloning patch,
which is part of his original patch for NEdit 5.0.2.

Use the menu Windows->Clone Tab to create a new window,
which is a clone of the invoking tab. Split panes will
also be cloned.

The tabs, window and icon titles will reflect the clone
status with an additional "<#>" appended to the
filenames, with # being the index of the clone.

As of v1.0, you can't move or detach a clone, but we
may expect this to change in the future version.

Have fun!

Discussion

  • TK Soh

    TK Soh - 2005-04-11

    patch v1.0: original release (poorly tested)

     
  • Tony Balinski

    Tony Balinski - 2005-04-11

    Logged In: YES
    user_id=618141

    Very, very smooth.

    OK, it's not quite ready for prime-time, but I'm pretty
    impressed by what you have so far. I can finally see two
    parts of the same file side-by-side! I also like the ability
    to supply different syntax highlighting to different clones
    - I would have thought this would be a very useful feature
    for people dealing with scripts where more than one language
    is used in a single file, or where different aspects of a
    file should be highlighted (say HTML markup in one clone,
    the HTML text content in another).

    I suppose we should also consider macro integration here -
    what does it mean to call focus_window/raise_window? Can we
    choose which clone to go to? (I suppose the issue is also
    true of panes.) And, as you say, tab shuffling should also
    be allowed.

    Anyway, well done! I do hope this can move into the main
    branch soon!

    Tony

     
  • TK Soh

    TK Soh - 2005-04-12

    Logged In: YES
    user_id=411637

    V1.1 fixed the occasional crashes when using different
    langmode on each clone. Each clone will inherit but maintain
    its own set of bookmarks. Rangsets, however, will be shared
    among clones; so do the indent and matching styles. Also
    fixed the duplicate filenames on Exit dialog. Sorry, no
    cloned-tabs shuffling yet.

    Prime time? Given our track record, I would be happy if the
    patch can be commited within a year ;-)

    Any thought on the macro business?

     
  • TK Soh

    TK Soh - 2005-04-12

    patch v1.1: fixed asorted bugs.

     
  • TK Soh

    TK Soh - 2005-04-13

    Logged In: YES
    user_id=411637

    v2.0 allows moving and detaching of cloned tabs.

     
  • TK Soh

    TK Soh - 2005-04-13

    patch v2.0: support moving/detaching of clones

     
  • TK Soh

    TK Soh - 2005-04-15

    Logged In: YES
    user_id=411637

    uploaded v2.1:

    1. fixed coredump after moving tabs
    2. added $clone_index (see online help text)

     
  • TK Soh

    TK Soh - 2005-04-15

    Logged In: YES
    user_id=411637

    > 2. added $clone_index (see online help text)

    2. added $clone_index macro variable (see online help text)

     
  • TK Soh

    TK Soh - 2005-04-15

    Logged In: YES
    user_id=411637

    also in v2.1:

    3. added Clone_Tab to tab context menu.

     
  • TK Soh

    TK Soh - 2005-04-25

    Logged In: YES
    user_id=411637

    uploaded v2.2:

    1. fixed codedump when closing clones with matching marker
    on display.

     
  • TK Soh

    TK Soh - 2005-04-25

    patch v2.2: fixed coredump when closing clone

     
  • Tony Balinski

    Tony Balinski - 2005-04-28

    Logged In: YES
    user_id=618141

    A couple of buglets and a bit of design criticism

    - when you clone, you lose the cursor position and any
    current selection
    - if you close a clone with an active selection, that same
    selection in the original window cannot be pasted in another
    window/app

    I would have more individual window properties:
    - locking: if you clone just to consult, you may lock the
    clone but wish to modify the original
    - indent style: ths could be linked to language mode; since
    you can apply different languages to clones, they should
    also have independent indent style
    - overstrike: you're potentially in two places at the same
    time for different reasons - you may want overstrike in one
    clone, insert in another
    - wrap mode: no wrap in one clone, continuous in another
    could be useful

    I would also consider tab size, but I think that might be
    just too difficult, given that the shared textBuf rectangle
    operations depend in it.

    I am now using this as a regular patch. I had no difficulty
    adding it to my other patches. I use the functionality
    often. I have had rare crashes (one involved a tab
    drag-n-drop, provided by another patch; I don't know the
    reasons for the others); it really seems pretty stable.

    I am not sure how to address adding more operations to the
    macro menu than just the "clone_document" action procedure
    and the $clone_index variable. These may be enough. I would
    like to see focus_window/raise_window behave slightly
    differently: the viewable clone these select should be the
    most recently accessed by default. Similarly, when closing a
    window, the document window previously accessed should be
    raised (whether as a tab in a multitab window or brought
    forward and focused if in a separate window, and you're not
    using click-for-keyboard-focus). These are fairly minor
    issues however.

    Anybody else try this out? It really is excellent! More
    thoughts would be welcome too.

     
  • TK Soh

    TK Soh - 2005-05-02

    Logged In: YES
    user_id=411637

    v2.3 has the bugfix on the selection. It also fixed a rare
    BadWindow error on Solaris 2.6 when cloning.

    Those suggestion are valid enhancement, but right now I am
    more concerned with the stability of the patch. So, I'd
    suggest look at them in the later stage when more people
    have tried out the patch.

    Admittedly, the macro support is quite primitive, but I
    really don't have much idea now. Macros changes are tricky,
    so we need to be more careful with the design before
    implementing it.

     
  • TK Soh

    TK Soh - 2005-05-02

    patch v2.3: fixed selection and BadWindow bugs

     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks