[squeak-dev] annoying bug with close bracket

Marcel Taeumel marcel.taeumel at hpi.de
Wed Dec 29 18:58:57 UTC 2021


Hi Eliot --

> Ok, but typing ] when there is a non-empty selection doesn’t have to mean “remove bracket” unless the selection is actually surrounded by brackets, does it?


That's correct. But Jakob was faster with this idea. And it's already in Trunk. :-D The closing bracket will appear (replacing the selection) when there is nothing to strip off. You can use undo if you destroy content by accident.

Best,
Marcel
Am 29.12.2021 17:30:22 schrieb Eliot Miranda <eliot.miranda at gmail.com>:


On Dec 28, 2021, at 9:47 PM, Marcel Taeumel <marcel.taeumel at hpi.de> wrote:



Hi Eliot --

Yes, that's an unfortunate side effect of having "enclose text selection" enabled. If you do not like this behavior, you can

TextEditor encloseSelection: false.
LegacyShortcutsFilter legacyShortcutsEnabled: true.

to then be able to distinguish between cmd+] and ].

Since the Compiler warning is selected to be able to easily remove it, you would have to remove it before typing () [] {} <> with "Enclose text selection" enabled.

Yet, we should somehow notify the user that the input was acknowledged but rejected. #flash used to do this.

Ok, but typing ] when there is a non-empty selection doesn’t have to mean “remove bracket” unless the selection is actually surrounded by brackets, does it?


Best,
Marcel
Am 28.12.2021 20:36:10 schrieb Eliot Miranda <eliot.miranda at gmail.com>:
Hi Marcel, Hi All,

    inspect
        Smalltalk specialObjectsArray
in the evaluator workspace at the bottom type exactly this (it is missing the closing square bracket)

    self select: [:o| o isSymbol or: [o isArray and: [o anySatisfy: #isSymbol]]

hit print it. Now the compiler generates the warning, which is selected:

self select: [:o| o isSymbol or: [o isArray and: [o anySatisfy: #isSymbol]] "Period or right bracket expected ->"


typing ']' has no effect :-(  Instead one has to delete the selection and then hit ']' :-(

_,,,^..^,,,_

best, Eliot
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20211229/e945bf52/attachment-0001.html>


More information about the Squeak-dev mailing list