[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.
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
[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