[scintilla:bugs] #2470 SCI_DELETERANGE does not delete the whole doc when given the result of SCI_GETTEXTLENGTH

2 views
Skip to first unread message

Jasper de Keijzer

unread,
Mar 25, 2025, 10:00:21 AMMar 25
to scintill...@googlegroups.com

[bugs:#2470] SCI_DELETERANGE does not delete the whole doc when given the result of SCI_GETTEXTLENGTH

Status: open
Group: Bug
Labels: SCI_DELETERANGE
Created: Tue Mar 25, 2025 02:00 PM UTC by Jasper de Keijzer
Last Updated: Tue Mar 25, 2025 02:00 PM UTC
Owner: nobody

According to the documentation I should be able to use the following code to clear the editor:

int start_selection = 0;
int end_selection = 0;
int selection_range = 0;

// Set the 'target' range to be the whole document.
end_selection = (int)CallScintilla(SCI_GETTEXTLENGTH, 0, 0);

selection_range = (end_selection - start_selection);

CallScintilla(SCI_DELETERANGE, start_selection, selection_range);

However the last character stays in the editor.

This looks to me as a bug.

Thanks for looking into this issue
Jasper de Keijzer
Principal software developer at Rocket Software corp.


Sent from sourceforge.net because scintill...@googlegroups.com is subscribed to https://sourceforge.net/p/scintilla/bugs/

To unsubscribe from further messages, a project admin can change settings at https://sourceforge.net/p/scintilla/admin/bugs/options. Or, if this is a mailing list, you can unsubscribe from the mailing list.

Neil Hodgson

unread,
Mar 27, 2025, 5:40:23 PMMar 27
to scintill...@googlegroups.com
  • status: open --> open-works-for-me
  • Comment:

Can't reproduce in SciTE.


[bugs:#2470] SCI_DELETERANGE does not delete the whole doc when given the result of SCI_GETTEXTLENGTH

Status: open-works-for-me


Group: Bug
Labels: SCI_DELETERANGE
Created: Tue Mar 25, 2025 02:00 PM UTC by Jasper de Keijzer
Last Updated: Tue Mar 25, 2025 02:00 PM UTC
Owner: nobody

Neil Hodgson

unread,
Nov 10, 2025, 1:15:35 AMNov 10
to scintill...@googlegroups.com
  • status: open-works-for-me --> closed-works-for-me

[bugs:#2470] SCI_DELETERANGE does not delete the whole doc when given the result of SCI_GETTEXTLENGTH

Status: closed-works-for-me


Group: Bug
Labels: SCI_DELETERANGE
Created: Tue Mar 25, 2025 02:00 PM UTC by Jasper de Keijzer

Last Updated: Thu Mar 27, 2025 09:40 PM UTC
Owner: nobody

Reply all
Reply to author
Forward
0 new messages