2010/7/31 Nick Ager <nick.a...@gmail.com>:
> Hi Lukas,
>
>> > My apologies - I've just downloaded the latest Eclipse and you are
>> > correct
>> > the smart-characters work in a similar manor. However one important
>> > usability difference is that when entering a string, my brain won't stop
>> > my
>> > fingers from closing the quote - even though my eyes see "Smart
>> > Characters"
>> > have automatically inserted the closing quote. On Eclipse the editor
>> > infers
>> > I'm typing the closing quote/bracket etc and skips over the already
>> > inserted
>> > "Smart Character", in Pharo it inserts another set of quotes giving me
>> > three
>> > quotes at the end of my string and leaving the insertion point between
>> > the
>> > first the second quote.  I think this issue was shared by our
>> > CampSmalltalk
>> > beginners.
>>
>> That's fairly easy to adapt, please try the following version from
>> <http://source.lukas-renggli.ch/unsorted>:
>>
>>  Name: ECompletion-lr.126
>>  Author: lr
>>  Time: 31 July 2010, 4:10:04 pm
>>  UUID: 777d55d6-95e9-4630-a5ac-b35347286646
>>  Ancestors: ECompletion-lr.125
>>
>>  - try to be smarter with smart characters
>
> Thanks for the that - it's getting there. A couple of issues:
> * The change appears to have introduced odd delete behaviour. When I delete
> a character within smart quotes, a character *and* the ending smart quote is
> deleted - different behaviour to prior to your change,
> * If I enter:  ('   in Eclipse when I type:  ') it skips over both the
> closing ' and the closing ).
> Apologies for my pedantry.

Well, I am sorry I said it is fairly easy to adapt. The implementation
was really bogus because it globally kept state. I rewrote the code
from scratch and committed it here:

  Name: ECompletion-lr.127
  Author: lr
  Time: 31 July 2010, 7:21:25 pm
  UUID: 42e3e807-2478-4dda-b207-acf162648cfe
  Ancestors: ECompletion-lr.126

  - rewrote the complete smart character logic (very ugly)

Now this is really ugly and long code and there are literally dozens
of cases to handle. Let me know if it works better for you? I kind of
like it. The behavior for smart characters and the backspace is now
entirely different if there is a selection or if you are just typing.

Lukas

-- 
Lukas Renggli
www.lukas-renggli.ch

_______________________________________________
Pharo-project mailing list
Pharo-project@lists.gforge.inria.fr
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project

Reply via email to