XusinboyBekchanov / VisualFBEditor

IDE for FreeBasic
Other
169 stars 39 forks source link

Code editor code-tip code-hint goes to a new line after pressing 'Enter' on the keyboard #149

Closed W98X closed 3 years ago

W98X commented 3 years ago

The code hint drop down wrongly goes to a new line after the enter key on the keyboard is pressed to select a code hint.

Steps to reproduce:

  1. Type the name of a control followed by a 'dot'. eg comboxboxedit.

  2. After you press the dot key, the code hint drop down appears

  3. Use the up/down arrow keys on the keyboard to select a code-hint. eg additem vfbe codetip enter new line

  4. Press enter key on the keyboard to select it

  5. The selected code-hint is inserted into the code editor, but also the code editor then wrongly goes to a new line vfbe codetip after wrong new line

XusinboyBekchanov commented 3 years ago

You need to press the space bar.

W98X commented 3 years ago

Pressing the space bar selects the code hint, but it also adds a space to the code editor.

But what if a space is not required next?

Consider the following scenario of adding a column to a listview:

listview1.columns.Add "column one", , 125

If I type listview1., then select columns from the code hint, VFBE will add a space in the place where the next dot before add needs to be. So in this situation, the extra space isn't needed and needs to be deleted by pressing backspace. vfbe spacebar codehint wrong space

In FBEdit and WinFBE and Scite, pressing enter to select a code hint doesn't go to a new line.

demosthenesk commented 3 years ago

In linux, when selecting a code-hint with ENTER, it selects it correctly but add also a new line.

It should not add a new line or add a space. Just add the hint.

XusinboyBekchanov commented 3 years ago

Improved: When selecting from Auto Complete using Return key, does not branch to a new line: https://github.com/XusinboyBekchanov/VisualFBEditor/commit/7e6d3cfa0384875ea32fb8abf6fdd998805804cf

demosthenesk commented 3 years ago

in linux fixed!

XusinboyBekchanov commented 3 years ago

Good!

W98X commented 3 years ago

Excellent! It works just like FBEdit and WinFBE now. No more having to press backspace all the time :grinning:

Many thanks.

demosthenesk commented 3 years ago

i get error C:\Users\User\Downloads\VisualFBEditor-master\MyFbFramework\mff\TextBox.bas(566) error 158: Declaration outside the original namespace or class

XusinboyBekchanov commented 3 years ago

Here is the procedure declaration in place: image image

demosthenesk commented 3 years ago

did you fix it?

XusinboyBekchanov commented 3 years ago

No, it was in the old fix. You have confirmed that it works: https://github.com/XusinboyBekchanov/MyFbFramework/commit/948d7718093e9ad5fd7b226a816d765c99c9890e

demosthenesk commented 3 years ago

i ll try again and report.

XusinboyBekchanov commented 3 years ago

Fixed: TextBox in Windows: https://github.com/XusinboyBekchanov/MyFbFramework/commit/72d7491d8d1682068d8259de54d770b1c94de527

demosthenesk commented 3 years ago

All is ok! For some reason win10 kept old MyFbFramework...crazy windows....

In windows also i confirm is ok, fixed!

XusinboyBekchanov commented 3 years ago

Thanks!