Thu May 7 09:20:45 EDT 2009 steffen.sier...@gmail.com * Initial support for dependent region in snippets Ignore-this: 32418ccea46e14c542d0bd3af700ce46 WARNING: very experimental (dirty) code and may run into inifite loops in some cases... For testing i've added some more test snippets to examples/yi-vim-snippets.hs. Most errors (most likely running into an inifite loop) will occur due to badly/not updated marks, so always remember about the end-mark of a snippets region. Known Problems: 1. - run testSnippet2 by typing 'ts2'->Tab - place cursor into String "abcdef" on first line - delete to end of word (vim keymap 'dw') -> infinite loop The problem seems to be that both depend regions overlap, thus both will continue update each other recursively -> buffer size will increase exponentially (due to updates inside BufferM Monad yi seems to freeze...) 2. when undoing a snippet expansion or deleting markers are not deleted. Since the update hook still checks if these regions yi will behave very funny (still inserting text into other dependent regions not deleted so far...), furthermore in very unfortunate cases (when deleting text) dependent regions may overlap resulting in an infite loop updating the buffer...
M ./Yi/Buffer/Implementation.hs -1 +1 M ./Yi/Buffer/Misc.hs -1 M ./Yi/Buffer/Normal.hs -1 +1 M ./Yi/Snippets.hs -6 +148 M ./examples/yi-vim-snippets.hs -2 +37 --~--~---------~--~----~------------~-------~--~----~ Yi development mailing list yi-devel@googlegroups.com http://groups.google.com/group/yi-devel -~----------~----~----~----~------~----~------~--~---