It is not uncommon to run the same command repeatedly. In this case,
the history is actually unchanged - the item is removed from the first
position, and prepended again.
Details
Details
- Reviewers
broulik apol - Group Reviewers
Plasma - Commits
- R120:9686c05c7226: [KRunner] Avoid writing history if addToHistory is idempotent
run the same command twice, config file is not rewritten
run a new command, config is updated
Diff Detail
Diff Detail
- Repository
- R120 Plasma Workspace
- Lint
Automatic diff as part of commit; lint not applicable. - Unit
Automatic diff as part of commit; unit tests not applicable.
Comment Actions
I'm not sure what we win but I'm not against the optimization.
krunner/view.cpp | ||
---|---|---|
370 | m_history.constFirst() == item |