Autocomplete

Working on new editor enhancements?
AND51
Addict
Addict
Posts: 1040
Joined: Sun Oct 15, 2006 8:56 pm
Location: Germany
Contact:

Post by AND51 »

Hm... You're right! I didn't think of that before.
PB 4.30

Code: Select all

onErrorGoto(?Fred)
Trond
Always Here
Always Here
Posts: 7446
Joined: Mon Sep 22, 2003 6:45 pm
Location: Norway

Post by Trond »

This must be a bug:

Type
"and"
and move to the start of the line. There you type
Hello
and move to the start of the line. There you type
"
The and now turns into And.

Undo six times. This is well past the time when the and was changed, but it is not changed back.
Trond
Always Here
Always Here
Posts: 7446
Joined: Mon Sep 22, 2003 6:45 pm
Location: Norway

Post by Trond »

By the way, it's also possible to avoid this with a single quote instead of a comment:

Type
"lucille and friends"
Go to the start of the line and type (_ is space)
'Hello_
Press delete to delete the first "
Type a " before the '
Delete the '
freak
PureBasic Team
PureBasic Team
Posts: 5940
Joined: Fri Apr 25, 2003 5:21 pm
Location: Germany

Post by freak »

> Undo six times. This is well past the time when the and was changed, but it is not changed back.

The case correction is not recorded in the undo buffer, as it would be very annoying
if any case correction needed to be undone separately.
quidquid Latine dictum sit altum videtur
Trond
Always Here
Always Here
Posts: 7446
Joined: Mon Sep 22, 2003 6:45 pm
Location: Norway

Post by Trond »

Not separately, together with the action that triggered the case correction. By the way, auto-indent is undoed separately, and that is also annoying.
AND51
Addict
Addict
Posts: 1040
Joined: Sun Oct 15, 2006 8:56 pm
Location: Germany
Contact:

Post by AND51 »

@ freak:

I thought, autocomplete waits with the capitalization until word has been finished?

Try to create a constant #sonstiges... #SO seems to be a pre-declared variable that turns
#sonstiges
into
#SOnstiges

grrrrr! annoying! :roll:
PB 4.30

Code: Select all

onErrorGoto(?Fred)
PB
PureBasic Expert
PureBasic Expert
Posts: 7581
Joined: Fri Apr 25, 2003 5:24 pm

Post by PB »

I hate how if you press Enter, the highlighted word in AutoComplete gets used.
It would probably be better just to use TAB to complete the selected word.

Why? I was coding a little game and had 2 x variables: "wins" and "losses".
At one point I typed "Debug wins" and pressed Enter, and what happened?
The line was written as: "Debug WinSubmitCertificate_(". :(
I compile using 5.31 (x86) on Win 7 Ultimate (64-bit).
"PureBasic won't be object oriented, period" - Fred.
AND51
Addict
Addict
Posts: 1040
Joined: Sun Oct 15, 2006 8:56 pm
Location: Germany
Contact:

Post by AND51 »

PB, your problem can be solved easyly:

Go to preferneces, autocomplete and select the optiongadget "Only words, beginning with the typed word".

Your problem works here fine, I can press enter and "wins" will be typed.
PB 4.30

Code: Select all

onErrorGoto(?Fred)
freak
PureBasic Team
PureBasic Team
Posts: 5940
Joined: Fri Apr 25, 2003 5:21 pm
Location: Germany

Post by freak »

AND51 wrote:@ freak:

I thought, autocomplete waits with the capitalization until word has been finished?

Try to create a constant #sonstiges... #SO seems to be a pre-declared variable that turns
#sonstiges
into
#SOnstiges

grrrrr! annoying! :roll:
This is what this thread was about, and i said its fixed for 4.10
quidquid Latine dictum sit altum videtur
AND51
Addict
Addict
Posts: 1040
Joined: Sun Oct 15, 2006 8:56 pm
Location: Germany
Contact:

Post by AND51 »

Sorry, then I missed you somehow... Thank you! :wink:
PB 4.30

Code: Select all

onErrorGoto(?Fred)
User avatar
nco2k
Addict
Addict
Posts: 1344
Joined: Mon Sep 15, 2003 5:55 am

Post by nco2k »

PB wrote:I hate how if you press Enter, the highlighted word in AutoComplete gets used.
It would probably be better just to use TAB to complete the selected word.

Why? I was coding a little game and had 2 x variables: "wins" and "losses".
At one point I typed "Debug wins" and pressed Enter, and what happened?
The line was written as: "Debug WinSubmitCertificate_(". :(
thats exactly the reason why imo CTRL+RETURN would be better instead of just RETURN.

c ya,
nco2k
If OSVersion() = #PB_OS_Windows_ME : End : EndIf
AND51
Addict
Addict
Posts: 1040
Joined: Sun Oct 15, 2006 8:56 pm
Location: Germany
Contact:

Post by AND51 »

thats exactly the reason to ignore my post? :wink:

c ya,
AND51
PB 4.30

Code: Select all

onErrorGoto(?Fred)
User avatar
nco2k
Addict
Addict
Posts: 1344
Joined: Mon Sep 15, 2003 5:55 am

Post by nco2k »

i am using "Display only words..." since day 1 and it doesnt solve the problem, the reason why you dont have that problem is probably because you have selected a higher value in "Characters needed before opening the list" or you moved the cursor before you pressed return or done something else that caused the autocomplete window to close. :roll:

> thats exactly the reason to ignore my post?
there are many other reasons to ignore your posts. :wink:

c ya,
nco2k
If OSVersion() = #PB_OS_Windows_ME : End : EndIf
AND51
Addict
Addict
Posts: 1040
Joined: Sun Oct 15, 2006 8:56 pm
Location: Germany
Contact:

Post by AND51 »

I have set the value to 3.
You may tell me your value, but I don't believe that this has anything to do with PB's problem (except for the value 4, because "wins" has 4 letters).

> there are many other reasons to ignore your posts
for example? :P
PB 4.30

Code: Select all

onErrorGoto(?Fred)
User avatar
Kaeru Gaman
Addict
Addict
Posts: 4826
Joined: Sun Mar 19, 2006 1:57 pm
Location: Germany

Post by Kaeru Gaman »

hey, AND, cut this.


>> I hate how if you press Enter, the highlighted word in AutoComplete gets used.
> thats exactly the reason why imo CTRL+RETURN would be better instead of just RETURN.

I agree, good idea. TAB and CTRL-RETURN would be nice.
I use Tab when I want to write further after the completed command.
the completion on RETURN annoyed me more than once, too.
oh... and have a nice day.
Post Reply