Opened 7 years ago

Closed 4 years ago

Last modified 4 years ago

#16263 closed enhancement (fixed)

adding wxStyledTextCtrl AutoCompGetCurText

Reported by: evstevemd Owned by: Artur Wieczorek <artwik@…>
Priority: normal Milestone:
Component: wxStyledText Version: dev-latest
Keywords: Scintilla, wxStyledTextCtrl Cc: RobinD
Blocked By: Blocking:
Patch: yes


I'm not sure why it was not there in the first place but the Method is not implemented. I went thru troubles of implementing myself only to recognize that Scintilla have such thing[1]. So is there Objection that lead to it not being implemented? Am ready to make a patch if no objection at all!


Note the CC is just notifying RobinD as am not sure if trac sends messages automatically.

Attachments (1)

AutoCompGetCurText.patch download (4.1 KB) - added by NewPagodi 4 years ago.

Download all attachments as: .zip

Change History (5)

comment:1 Changed 5 years ago by NewPagodi

  • Patch set

I also noticed this wasn't implemented when working on some other patches for wxStyledTextCtrl related to autocompletion lists. I'm pretty sure there is no other way to get this information, so I think it should be added.

The patch simply modifies to to implement the method in the same way as all the other methods returning a wxString. In keeping with all the other autocompletion methods which change their interface name from 'AutoC...' to 'AutoComp...' for wxSTC, I changed the name to 'AutoCompGetCurrentText' from 'AutoCGetCurrentText'.

I've verified that this method returns the correct string with both autocompletion and userlists.

Changed 4 years ago by NewPagodi

comment:2 Changed 4 years ago by NewPagodi

I've updated the patch to be compatible with the changes to made recently.

I've also added entries in to make sure the method is listed in the correct portion of the documentation and gets an "@since 3.1.1" note.

comment:3 Changed 4 years ago by Artur Wieczorek <artwik@…>

  • Owner set to Artur Wieczorek <artwik@…>
  • Resolution set to fixed
  • Status changed from new to closed

In 1bcb30f6d76391b632cb111bcc1880ecb0d86829/git-wxWidgets:

Add wxStyledTextCtrl::AutoCompGetCurrentText()


Closes #16263.

comment:4 Changed 4 years ago by awi

I've noticed that there is some mess regarding internal representation of string buffers in wxSTC. In some functions there is used wxMemoryBuffer but in others wxCharBuffer. I think it would be nice to have an uniform representation for all strings. Documentation would suggest that wxCharBuffer is more suitable because it is dedicated for strings. wxMemoryBuffer seems to be dedicated for raw, amorphic data.

Note: See TracTickets for help on using tickets.