Issue 6933 in pharo: Fixing the fact that typing " at the end of a word produces "" while it should only do it if there is a space

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

Issue 6933 in pharo: Fixing the fact that typing " at the end of a word produces "" while it should only do it if there is a space

pharo
Status: Accepted
Owner: [hidden email]
Labels: Type-Bug

New issue 6933 by [hidden email]: Fixing the fact that typing " at  
the end of a word produces "" while it should only do it if there is a space
http://code.google.com/p/pharo/issues/detail?id=6933


With this change

aaa| + " => aaa"

aaa | + " => aaa ""

and

|aaa + " => "aaa

| aaa + " => "" aaa




_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker
Reply | Threaded
Open this post in threaded view
|

Re: Issue 6933 in pharo: Fixing the fact that typing " at the end of a word produces "" while it should only do it if there is a space

pharo

Comment #1 on issue 6933 by [hidden email]: Fixing the fact that  
typing " at the end of a word produces "" while it should only do it if  
there is a space
http://code.google.com/p/pharo/issues/detail?id=6933

smartCharacter: aCharacter
        | opposite previous next |
       

        editor hasSelection ifTrue: [
                "we selected a piece of text if the character is not a special one we do  
nothing."
                opposite := self smartCharactersMapping at: aCharacter ifAbsent: [ ^ nil  
].
               
                "else we wrap the selection"
                editor replaceSelectionWith: (String with: aCharacter) , (editor  
selection) , (String with: opposite).
                editor selectFrom: editor stopIndex to: editor stopIndex - 1.
                self invalidateEditorMorph.
                ^ true ].
       
        "we are not in a selection"
        opposite := self smartCharactersMapping at: aCharacter ifAbsent: [
                "if the character is not a special character"
                self smartInverseMapping
                        at: aCharacter
                        ifAbsent: [ ^ nil ]. "if the character is not a closing special  
character do nothing"
               
                "The character is special"
                editor blinkPrevParen: aCharacter.
                (editor nextCharacterIfAbsent: [ ^ nil ]) = aCharacter
                        ifFalse: [ ^ nil ]. "do not get this test but if we comment it out we  
cannot type closing ) anymore"
                editor selectFrom: editor startIndex + 1 to: editor startIndex.
                self invalidateEditorMorph.
                ^ true ].
       
        previous := editor previousCharacterIfAbsent: [ Character space ].
        next := editor nextCharacterIfAbsent: [ Character space ].
       
        "if we don't have separators (white space is a separator) we do not do  
anything"
         (previous isSeparator or: [ next isSeparator ])
                ifFalse: [ ^ nil ].
       
        "if the character is a closing one and the next one is the same??? - I do  
not understand what is the effect"
        "(opposite = aCharacter and: [ next = aCharacter ]) ifTrue: [
                editor selectFrom: editor startIndex + 1 to: editor startIndex.
                self invalidateEditorMorph.
                ^ true ]."
       
        next isSeparator
                        ifFalse: [ editor replaceSelectionWith: (String with: aCharacter)]
                        ifTrue: [
                                (previous isSeparator)
                                        ifFalse: [ editor replaceSelectionWith: (String with: aCharacter)]
                                        ifTrue: [ editor replaceSelectionWith: (String with: aCharacter with:  
opposite)]].
                       
        editor selectFrom: editor startIndex + 1 to: editor startIndex.
        self invalidateEditorMorph.
        ^ true


_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker
Reply | Threaded
Open this post in threaded view
|

Re: Issue 6933 in pharo: Fixing the fact that typing " at the end of a word produces "" while it should only do it if there is a space

pharo
Updates:
        Status: FixReviewNeeded

Comment #2 on issue 6933 by [hidden email]: Fixing the fact that  
typing " at the end of a word produces "" while it should only do it if  
there is a space
http://code.google.com/p/pharo/issues/detail?id=6933

And also fixed the smartBackspace :) to handle better the changes I did
Slice submitted in the usual place.


_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker
Reply | Threaded
Open this post in threaded view
|

Re: Issue 6933 in pharo: Fixing the fact that typing " at the end of a word produces "" while it should only do it if there is a space

pharo
In reply to this post by pharo
Updates:
        Status: MonkeyIsChecking

Comment #4 on issue 6933 by [hidden email]: Fixing the fact that  
typing " at the end of a word produces "" while it should only do it if  
there is a space
http://code.google.com/p/pharo/issues/detail?id=6933#c4

The Monkey is currently checking this issue. Please don't change it!


_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker
Reply | Threaded
Open this post in threaded view
|

Re: Issue 6933 in pharo: Fixing the fact that typing " at the end of a word produces "" while it should only do it if there is a space

pharo
Updates:
        Status: ValidatedByTheMonkey
        Labels: CheckedIn20384

Comment #5 on issue 6933 by [hidden email]: Fixing the fact that  
typing " at the end of a word produces "" while it should only do it if  
there is a space
http://code.google.com/p/pharo/issues/detail?id=6933#c5

This Issue has been checked by Ulysse the Monkey
       
6439 tests passed in 00:01:52s:
===============================
        CollectionsTests-Arrayed (553)
        CollectionsTests-Atomic (12)
        CollectionsTests-Sequenceable (912)
        CollectionsTests-SplitJoin (27)
        CollectionsTests-Stack (16)
        CollectionsTests-Streams (37)
        CollectionsTests-Strings (606)
        CollectionsTests-Support (12)
        CollectionsTests-Unordered (1954)
        CollectionsTests-Weak (739)
        CompilerTests (180)
        KernelTests-Chronology (593)
        KernelTests-Classes (68)
        KernelTests-Exception (2)
        KernelTests-Methods (179)
        KernelTests-Numbers (276)
        KernelTests-Objects (86)
        KernelTests-Pragmas (3)
        KernelTests-Processes (37)
        NECompletion-Tests (63)
        SUnit-Core-Extensions (3)
        SUnit-Core-Utilities (3)
        SUnit-Tests-Core (78)

----------------------------------------------------------
Loaded Source:  
SLICE-Issue-6933-Fixing-the-fact-that-typing-quot-at-the-end-of-a-word-produces-quotquot-while-it-should-only-do-it-if-there-is-a-space-StephaneDucasse.2  
from http://ss3.gemstone.com/ss/PharoInbox
Tested using Pharo-2.0-20384-a on CoInterpreter  
VMMaker-oscog-EstebanLorenzano.166 uuid:  
5773fcb9-2982-4507-8a9e-4308ec33731e Nov  6 2012
StackToRegisterMappingCogit VMMaker-oscog-EstebanLorenzano.166 uuid:  
5773fcb9-2982-4507-8a9e-4308ec33731e Nov  6 2012
https://git.gitorious.org/cogvm/blessed.git Commit:  
a7bf128cd3b9389e77ea0cdec9a515282926a483 Date: 2012-11-02 14:17:44 +0100  
By: Esteban Lorenzano <[hidden email]> Jenkins build #136


_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker
Reply | Threaded
Open this post in threaded view
|

Re: Issue 6933 in pharo: Fixing the fact that typing " at the end of a word produces "" while it should only do it if there is a space

pharo
Updates:
        Status: FixToInclude

Comment #6 on issue 6933 by [hidden email]: Fixing the fact that  
typing " at the end of a word produces "" while it should only do it if  
there is a space
http://code.google.com/p/pharo/issues/detail?id=6933

(No comment was entered for this change.)


_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker
Reply | Threaded
Open this post in threaded view
|

Re: Issue 6933 in pharo: Fixing the fact that typing " at the end of a word produces "" while it should only do it if there is a space

pharo
Updates:
        Status: Integrated

Comment #7 on issue 6933 by [hidden email]: Fixing the fact that  
typing " at the end of a word produces "" while it should only do it if  
there is a space
http://code.google.com/p/pharo/issues/detail?id=6933

in 2.0 386


_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker