Not signed in (Sign In)

Categories

Vanilla 1.1.1 is a product of Lussumo. More Information: Documentation, Community Support.

    • CommentAuthori
    • CommentTimeFeb 16th 2007
     permalink

    This snippet has a mirror ($1) within a tab stop ($2):

    { title: 'Reverse Tab Test' tab_trigger: 'tar' scope: 'text.html' content: '${1}=${2:$1}=1234567890 $0' }

    I changed my original snippet content for a simpler example. Mirrors in tab stops are useful to provide default values while still allowing the user to tab to it to modify its contents.

    Reproducing the bug:

    Scenario 1

    1. Type tar and press Tab to activate the snippet.
    2. Type “12345” for tab stop 1.
    3. Press Tab once and type in “123456” for tab stop 2.
    4. Press Shift + Tab to get back to tab stop 1.
    5. Type in “a”.
    6. Now the mirror contains “a6”.
      1. 5 characters are replaced, corresponding to the original length of the contents in tab stop 1.

    Scenario 2

    1. Now exit the snippet and reactivate it again.
    2. Type “123456” for tab stop 1.
    3. Press Tab once and type “123” for tab stop 2.
    4. Press Shift + Tab once to get back to tab stop 1.
    5. Type “a”.
    6. Now the mirror is corrupted.
      1. 6 characters are replaced from the start of the second tab stop. (these characters “123=12”)

    On another note, it seems that Intype will crash if I reload the bundles frequently…

    •  
      CommentAuthortstrokes
    • CommentTimeFeb 16th 2007
     permalink

    Yep, both scenarios happen as you stated.

  1.  permalink

    Ok, there’s a bug, but I think you will be not satissfied. When you modify parent input field ($2) the embedded reflection field (second $1) will be disabled. So moving back to $1 and modifying it once again will simply not modify the embedded $1. Fixed in 0.3.1.

    • CommentAuthori
    • CommentTimeAug 8th 2007
     permalink

    Tested and verified working.

    Its exactly the behaviour I would expect it to do. :) Good work martin!