Am 11.01.2009 22:13, schrieb Enrico Tröger:
On Fri, 09 Jan 2009 00:59:47 +0100, Thomas Martitz thomas.martitz@fhtw-berlin.de wrote:
Hey,
finally, the latest version of the patch, snippet-v3b.diff, landed in SVN. I did some minor modifications to use more GLib API and avoid using C99-only code.
Thanks a lot Thomas!
You're welcome :) I had a lot of fun doing this. I'm going to browse your changes as soon as possible, so that such stuff won't be needed the next time. Thanks for your patience and help. I definitely plan to contribute more, so it might pay off :)
Then use the snippet: class<TAB> and type "abcd" on the first cursor position, move the cursor back by two positions and press the "Move cursor in snippet" keybinding to jump to the next cursor position. The cursor is then inside "__construct" instead of inside the braces. Maybe we can live with that but it'd be better if it would be fixed though this might be not easy.
Fixed.
Hrm, it still seems to happen :(.
Uhm, right, seems I read your sentence wrong and "fixed" was regarding another issue.. There's some outstanding quirks, which are not trivial to solve (I sit the last two days trying to find a solution). But in the current way - once you get known to the quirks - it's relatively easy to avoid/work around/get fine with them.
The main use case: Insert the snipped, type, jump to next cursor, type, jump to next cursor, that's what's working fine.
Yes, they should probably be documented.
Maybe we can switch to GLib's GSList or GQueue implementation to save some duplicate code but OTOH, as I said on IRC, the amount of code in your implementation isn't that much and so it's fine, for now.
Maybe. I'll have another try. The issues I had with GSList are: I couldn't free temporary allocated lists, because the concat function didn't allow to copy the values. It concats the list directly. Plus, when I free'd the global list, instead of "nothing", it was filled by zeroes (not what I call a free). Those zeroes where visible with the build-in print function. Those may lead to memory leaks, which *shouldn't* happen with my queueu.
On the other hand, maybe I didn't get this GSList right, and just failed.
Default hotkey issue is still open (if there even should be one).
I guess for now it's sufficient to leave it undefined.
Fine with me :)