IDE bug: if paste "args /as args" , "/as" becomes "/As"

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
sec
Enthusiast
Enthusiast
Posts: 789
Joined: Sat Aug 09, 2003 3:13 am
Location: 90-61-92 // EU or ASIA
Contact:

IDE bug: if paste "args /as args" , "/as" becomes "/As"

Post by sec »

IDE bug: if paste

Code: Select all

args /as args
, "/as" becomes "/As"

It should not do that, maybe need fix autocomplete
Marc56us
Addict
Addict
Posts: 1477
Joined: Sat Feb 08, 2014 3:26 pm

Re: IDE bug: if paste "args /as args" , "/as" becomes "/As"

Post by Marc56us »

Code: Select all

args /As args
, "/as" becomes "/As"
It should not do that, maybe need fix autocomplete
Error: Line 1: A variable can't be named the same as a keyword: As.

'As' is not listed in PB functions/keyword, but is used in Import : EndImport

Code: Select all

    Import "Filename"
      FunctionName.<type>(<parameter>, [, <parameter> [= DefaultValue]...]) [As "SymbolName"]
      ...
      VariableName.<type> [As "SymbolName"]
    EndImport
Not a bug, 'As' is a keyword :wink:
sec
Enthusiast
Enthusiast
Posts: 789
Joined: Sat Aug 09, 2003 3:13 am
Location: 90-61-92 // EU or ASIA
Contact:

Re: IDE bug: if paste "args /as args" , "/as" becomes "/As"

Post by sec »

Marc56us wrote:

Code: Select all

args /As args
, "/as" becomes "/As"
It should not do that, maybe need fix autocomplete
Error: Line 1: A variable can't be named the same as a keyword: As.

'As' is not listed in PB functions/keyword, but is used in Import : EndImport

Code: Select all

    Import "Filename"
      FunctionName.<type>(<parameter>, [, <parameter> [= DefaultValue]...]) [As "SymbolName"]
      ...
      VariableName.<type> [As "SymbolName"]
    EndImport
Not a bug, 'As' is a keyword :wink:
Hi
I see, in fact that behavior did my command line run wrong :(
ex: RunProgram(cmd$," << paste that line here...


I don't want turn off neat IDE option "Preferences\Editor\Editing\ Enable Case correction",
I still think it's bug :wink:
Marc56us
Addict
Addict
Posts: 1477
Joined: Sat Feb 08, 2014 3:26 pm

Re: IDE bug: if paste "args /as args" , "/as" becomes "/As"

Post by Marc56us »

I see, in fact that behavior did my command line run wrong :(
ex: RunProgram(cmd$," << paste that line here...
I've tested it. Copying "args /as args" into a string (even if not yet closed), does not modify the case

Code: Select all

RunProgram(cmd$," args /as args
Works as expected: Case correction is disabled when paste text inside (or after) quotation. No bug.

" ' ; (and some other characters) Disable keyword detection up to the closing character

(Tested 5.71B1 x64 Windows)

:wink:
sec
Enthusiast
Enthusiast
Posts: 789
Joined: Sat Aug 09, 2003 3:13 am
Location: 90-61-92 // EU or ASIA
Contact:

Re: IDE bug: if paste "args /as args" , "/as" becomes "/As"

Post by sec »

Marc56us wrote:
I see, in fact that behavior did my command line run wrong :(
ex: RunProgram(cmd$," << paste that line here...
I've tested it. Copying "args /as args" into a string (even if not yet closed), does not modify the case

Code: Select all

RunProgram(cmd$," args /as args
Works as expected: Case correction is disabled when paste text inside (or after) quotation. No bug.

" ' ; (and some other characters) Disable keyword detection up to the closing character

(Tested 5.71B1 x64 Windows)

:wink:
Hi
Maybe when i did copy without “ ‘ ; before it, so it did case correction wrong. Maybe not bug but need improve? Did you try similar this feature in https://code.visualstudio.com/ ,best ever code editor
User avatar
kenmo
Addict
Addict
Posts: 1967
Joined: Tue Dec 23, 2003 3:54 am

Re: IDE bug: if paste "args /as args" , "/as" becomes "/As"

Post by kenmo »

I stand by what I said 3 years ago, Auto-case should only happen when you type a word or auto-complete a word :)

viewtopic.php?f=3&t=64788
Marc56us
Addict
Addict
Posts: 1477
Joined: Sat Feb 08, 2014 3:26 pm

Re: IDE bug: if paste "args /as args" , "/as" becomes "/As"

Post by Marc56us »

Code: Select all

Maybe when i did copy without “ ‘ ; before it, so it did case correction wrong. Maybe not bug but need improve? Did you try similar this feature in https://code.visualstudio.com/ ,best ever code editor
No, I haven't tried, I prefer to use the internal editor which is lightweight and has all the tools of the language integrated.

I prefer that IDE does little but do it quickly and well. For the rest, if it reformats to copied/pasted when I forgot a " then I do CTRL+Z

:wink:
sec
Enthusiast
Enthusiast
Posts: 789
Joined: Sat Aug 09, 2003 3:13 am
Location: 90-61-92 // EU or ASIA
Contact:

Re: IDE bug: if paste "args /as args" , "/as" becomes "/As"

Post by sec »

kenmo wrote:I stand by what I said 3 years ago, Auto-case should only happen when you type a word or auto-complete a word :)

viewtopic.php?f=3&t=64788
:mrgreen: probably we need proof its bug , so it will fix quickly?

3yrs time fly ;)
sec
Enthusiast
Enthusiast
Posts: 789
Joined: Sat Aug 09, 2003 3:13 am
Location: 90-61-92 // EU or ASIA
Contact:

Re: IDE bug: if paste "args /as args" , "/as" becomes "/As"

Post by sec »

Marc56us wrote:

Code: Select all

Maybe when i did copy without “ ‘ ; before it, so it did case correction wrong. Maybe not bug but need improve? Did you try similar this feature in https://code.visualstudio.com/ ,best ever code editor
No, I haven't tried, I prefer to use the internal editor which is lightweight and has all the tools of the language integrated.

I prefer that IDE does little but do it quickly and well. For the rest, if it reformats to copied/pasted when I forgot a " then I do CTRL+Z

:wink:
I like your idea! I tried vscode vs notepad++ with python , goback notepad++ ftw :lol:
With PB, never ever code it outside internal editor. That is reason i put this request as the bug :oops:
Post Reply