DocumentPrivate: Add option "Auto Reload Document" to View menu

Authored by loh.tar on Apr 2 2019, 5:49 PM.

Description

DocumentPrivate: Add option "Auto Reload Document" to View menu

...and a "Enable Auto Reload" button to the ModOnHdPrompt.

There are a couple of request for such feature with different details and some
opinions against it at all. Not only because KTextEditor is not well suited to
work like 'tail -f'. However, this option should not cause any harm.

Currently jump the view after an update sometimes/often but that may fixed later
e.g. by D17857

  • The max update interval is set to 3sec. Shorter intervals would cause a bad user experience
  • As long as the user scrolls around updates are blocked
  • The cursor is set to first/last line of the view when scroll above/below. This is currently not the best solution and cause also the mentioned jumps. Setting to the middle of the view would reduce this odd jumping but it shouldn't jump in any case
  • Placing the cursor into the last line cause to work like 'tail -f'

BUG:375361
BUG:377505
BUG:384384
FIXED-IN: 5.57

Differential Revision: https://phabricator.kde.org/D19517

Details

Committed
loh.tarApr 2 2019, 5:49 PM
Differential Revision
D19517: DocumentPrivate: Add option "Enable Auto Reload" to ModOnHdPrompt
Parents
R39:135269639e70: Fix to previous commit eb90ca52
Branches
Unknown
Tags
Unknown