Ignore:
Timestamp:
Aug 13, 2025, 9:46:30 PM (2 months ago)
Author:
Frederik Heber <frederik.heber@…>
Branches:
Candidate_v1.7.0, stable
Children:
463bfb
Parents:
bcc29ca
git-author:
Frederik Heber <frederik.heber@…> (08/13/25 08:41:09)
git-committer:
Frederik Heber <frederik.heber@…> (08/13/25 21:46:30)
Message:

FIX: FormatParserStorage did not add parser instance on SetOutput.

  • using the InputAction on an empty file would not write that file using the desired parser (judged from suffix) on exit because the respective was set as desired output but not instantiated (ParserPresent).
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/Actions/ActionHistory.cpp

    rbcc29ca r780bfa  
    100100void ActionHistory::setMark() {
    101101  HistoryElement * const mark = &(history.back());
    102   ASSERT( mark != NULL,
    103       "ActionHistory::setMark() - must not push NULL as element");
     102  if (mark == NULL) {
     103    ELOG(2, "setMark - must not push NULL as element");
     104    return;
     105  }
    104106  marked.push(mark);
    105107}
    106108
    107109void ActionHistory::unsetMark() {
    108   marked.pop();
     110  if (!marked.empty()) {
     111    marked.pop();
     112  } else {
     113        ELOG(2, "unsetMark - stack is already empty.");
     114  }
    109115}
    110116
    111117void ActionHistory::undoTillMark() {
    112118  if (marked.empty()) {
    113     undoLast();
     119        ELOG(2, "There is no undo mark, not undoing anything.");
    114120  } else {
    115121    const HistoryElement * const mark = marked.top();
Note: See TracChangeset for help on using the changeset viewer.