Update display after incrementing history index
Needs ReviewPublic

Authored by mschiller on Oct 17 2018, 6:25 PM.

Details

Summary

The history index should get incremented before changing the
displayed value. Without this it requires pressing the history
navigation shortcuts twice until the first change occurs.

Test Plan

Fill histroy with some values.
Press Ctrl + Z to move history up.

Without this patch you need to press the hotkey twice until
something happens.

Same with other direction (Ctrl + Shift + Z).

Diff Detail

Repository
R353 KCalc
Branch
fix/histnavigation
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 17517
Build 17535: arc lint + arc unit
mschiller requested review of this revision.Oct 17 2018, 6:25 PM
mschiller created this revision.
cfeck requested changes to this revision.Jul 10 2019, 7:17 PM
cfeck added a reviewer: teran.

Sorry for the delay, I just tested this.

If I press 'Ctrl+Z' while entering a new operation, then now it goes two steps back.

To test type:

7 + 8 Enter
5 + 5 Enter
12 + 12 Ctrl+Z

I now shows 15 instead of 10.

This revision now requires changes to proceed.Jul 10 2019, 7:17 PM
mschiller updated this revision to Diff 67615.Oct 10 2019, 3:00 PM

Show last entry of history if current display value is not the last history value

mschiller updated this revision to Diff 67616.Oct 10 2019, 3:05 PM
  • fix indentation