#15234 closed defect (fixed)

wxStyledTextCtrl::SetInsertionPointEnd() doesn't work

Reported by: troelsk Owned by:
Priority: low Milestone:
Component: wxStyledText Version: stable-latest
Keywords: wxTextEntryBase wxStyledTextCtrl simple Cc:
Blocked By: Blocking:
Patch: no

Description

wxStyledTextCtrl::SetInsertionPointEnd() has no effect currently.

Patch: Implement it in wxTextEntryBase as the doc says:
"This is equivalent to calling wxTextCtrl::SetInsertionPoint() with wxTextCtrl::GetLastPosition() argument."
http://docs.wxwidgets.org/trunk/classwx_text_entry.html#a954a065a2f20da350ae830faff1fff95

Attachments (2)

SetInsertionPointEnd.patch download (580 bytes) - added by troelsk 18 months ago.
SetInsertionPointEnd.2.patch download (1.1 KB) - added by troelsk 18 months ago.
wxSTC

Download all attachments as: .zip

Change History (5)

Changed 18 months ago by troelsk

comment:1 Changed 18 months ago by vadz

  • Component changed from GUI-all to wxStyledText
  • Keywords simple added
  • Patch unset
  • Priority changed from normal to low
  • Status changed from new to confirmed
  • Summary changed from wxStyledTextCtrl::SetInsertionPointEnd() bugfix to wxStyledTextCtrl::SetInsertionPointEnd() doesn't work

Could this be done at wxSTC level only? We need to handle -1 being passed to SetInsertionPoint() too, a lot of existing code does it, so it would be better to handle this at wxSTC level.

TIA!

Changed 18 months ago by troelsk

wxSTC

comment:2 Changed 18 months ago by troelsk

Ok, done now

comment:3 Changed 18 months ago by VZ

  • Resolution set to fixed
  • Status changed from confirmed to closed

(In [74069]) Fix wxStyledTextCtrl::SetInsertionPointEnd().

This relied on SetInsertionPoint(-1) working like in wxTextCtrl but it didn't.
Add an explicit check to it for consistency with the other classes and to make
SetInsertionPointEnd() work.

Closes #15234.

Note: See TracTickets for help on using tickets.