[scintilla:feature-requests] #1587 "hard stop" SCI_FORMATRANGEFULL (Option or Variant)

0 views
Skip to first unread message

pryrt

unread,
7:55 PM (2 hours ago) 7:55 PM
to scintill...@googlegroups.com

[feature-requests:#1587] "hard stop" SCI_FORMATRANGEFULL (Option or Variant)

Status: open
Group: Initial
Labels: scintilla printing
Created: Thu Jun 11, 2026 11:55 PM UTC by pryrt
Last Updated: Thu Jun 11, 2026 11:55 PM UTC
Owner: nobody

As discussed in Notepad++ PR#18063, it would be useful to have an version of SCI_FORMATRANGEFULL that forces it to not go beyond chrg.cpMax rather than the current implementation using cpMax as a "suggestion" and actually stopping at the the first line-ending (or EOF) after the cpMax as the end point

In the Notepad++ use case, it would allow inserting page breaks at formfeed (ASCII 12, U+000C). But it would also allow other use cases -- as a text-based application might have any number of reasons for intentionally breaking the page at a specific point (I could immediately think of making the pages all have the same number of characters, but I am sure there are other use cases that I haven't thought of).

As far as implementation goes, I had two ideas:

  • dedicated message (like SCI_FORMATLIMITEDRANGEFULL) that essentially duplicates the SCI_FORMATRANGEFULL command, but making it stop as cpMax instead of continuing beyond when looking for EOL
  • or have some way to set an option for it on the fly: like another message, something like
    • a separate SCI_SETFORMATRANGELIMITMODE
      • with SC_FORMATRANGE_EOL=0 for default search-for-EOL, and SC_FORMATRANGE_HARDSTOP=1 for the "hard stop"
    • or maybe repurposing the wParam bool draw to be int drawMode
      • with SC_FORMATRANGE_NONE=0 for no-draw, SC_FORMATRANGE_EOL=1 for normal mode, and SC_FORMATRANGE_HARDSTOP=2 for the "hard stop" at cpMax

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

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

Reply all
Reply to author
Forward
0 new messages