diff options
| author | Matthias Melcher <github@matthiasm.com> | 2024-08-04 00:32:05 +0200 |
|---|---|---|
| committer | Matthias Melcher <github@matthiasm.com> | 2024-08-04 00:32:11 +0200 |
| commit | 9bb9cb3f962bea7365e21bb1a836bf140deb6570 (patch) | |
| tree | 97e66074c84b140cdce7f883925f395617e49d99 /FL/Fl_Text_Buffer.H | |
| parent | bc7358036683fd7bd4e6a0fe29256fc70f573978 (diff) | |
Optimize Fl_Text_Display scrolling speed (#596).
Diffstat (limited to 'FL/Fl_Text_Buffer.H')
| -rw-r--r-- | FL/Fl_Text_Buffer.H | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/FL/Fl_Text_Buffer.H b/FL/Fl_Text_Buffer.H index fa3916eba..6d59e9adf 100644 --- a/FL/Fl_Text_Buffer.H +++ b/FL/Fl_Text_Buffer.H @@ -636,6 +636,13 @@ public: int count_lines(int startPos, int endPos) const; /** + Estimate the number of newlines between \p startPos and \p endPos in buffer. + This call takes line wrapping into account. It assumes a line break at every + `lineLen` characters after the beginning of a line. + */ + int estimate_lines(int startPos, int endPos, int lineLen) const; + + /** Finds the first character of the line \p nLines forward from \p startPos in the buffer and returns its position. */ |
