Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

History controller refactored #187

Merged
merged 9 commits into from
Feb 20, 2023
Merged

Conversation

yescorp
Copy link
Collaborator

@yescorp yescorp commented Feb 15, 2023

Yestay Tastanov added 2 commits February 15, 2023 10:33
@codecov
Copy link

codecov bot commented Feb 15, 2023

Codecov Report

Merging #187 (0ea295c) into main (37b1e2b) will increase coverage by 0.26%.
The diff coverage is 95.16%.

@@            Coverage Diff             @@
##             main     #187      +/-   ##
==========================================
+ Coverage   82.24%   82.51%   +0.26%     
==========================================
  Files          85       85              
  Lines        2557     2602      +45     
==========================================
+ Hits         2103     2147      +44     
- Misses        454      455       +1     
Impacted Files Coverage Δ
lib/src/code_field/code_controller.dart 79.75% <66.66%> (-0.12%) ⬇️
lib/src/history/code_history_controller.dart 100.00% <100.00%> (ø)
lib/src/history/limit_stack.dart 100.00% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@yescorp yescorp requested a review from alexeyinkin February 15, 2023 06:20
@yescorp yescorp marked this pull request as ready for review February 15, 2023 06:20
@yescorp yescorp requested a review from alexeyinkin February 16, 2023 17:21
@yescorp yescorp requested a review from alexeyinkin February 17, 2023 13:00
expect(controller.historyController.stack.length, 6);
expect(controller.code.text, code2.text);
expect(controller.selection, selection2);
for (int i = manualHistoryRecords.length - 2; i >= 0; i--) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
for (int i = manualHistoryRecords.length - 2; i >= 0; i--) {
for (int i = manualHistoryRecords.length - 1; --i >= 0; ) {

Comment on lines 478 to 479
firstCode ??= controller.code;
firstSelection ??= controller.selection;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

codeAfterFirstEdit, selectionAfterFirstEdit
// Set after the first change.

@yescorp yescorp requested a review from alexeyinkin February 19, 2023 14:25
@alexeyinkin alexeyinkin merged commit a6ba47a into main Feb 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants