Skip to content
Snippets Groups Projects
Commit 97a1fc43 authored by Michal Humpula's avatar Michal Humpula :fire:
Browse files

add word count statistics in statusbar

This option is disabled by default, because it adds some nontrivial CPU and
memory overhead, though the implementation tries to keep it as minimal
as possible.

Whenewer the change in document is triggered, the timer is fired to wait
for 500ms of inactivity. The trigger is reseted every time the change
happens so as long as she keeps changing the document every 500ms
or so, the counting wont stall the editor and her experience.

Longer reculculations are done in batches of size 100 with the help of
500ms trigger. Which means 10000 lines long document will take 20s to
compute. Subsequent counting of changes will be much faster because of
the internal computation cache.

Interface changes includes adding signal KTextEditor::DocumentPrivate::loaded
to monitor document reload.

GUI: menu: View -> Show Word Count
REVIEW: 122571
BUG: 65740
FIXED-IN: 5.8.0
parent 87c38e41
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment