File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -1762,11 +1762,11 @@ void Screen<Cell>::requestAnsiMode(unsigned int mode)
17621762template <CellConcept Cell>
17631763void Screen<Cell>::requestDECMode(unsigned int mode)
17641764{
1765- auto const modeEnum = fromDECModeNum (mode);
1766-
1767- auto const modeResponse = [&]() -> ModeResponse {
1765+ auto const modeResponse = [this , mode]() -> ModeResponse {
1766+ auto const modeEnum = fromDECModeNum (mode);
17681767 if (modeEnum.has_value ())
17691768 {
1769+ auto const modeEnum = fromDECModeNum (mode);
17701770 if (_terminal->isModeEnabled (modeEnum.value ()))
17711771 return ModeResponse::Set;
17721772 else
Original file line number Diff line number Diff line change @@ -833,8 +833,8 @@ constexpr std::optional<DECMode> fromDECModeNum(unsigned int modeNum) noexcept
833833 case 2030 : return DECMode::ReportGridCellSelection;
834834 case 2031 : return DECMode::ReportColorPaletteUpdated;
835835 case 8452 : return DECMode::SixelCursorNextToGraphic;
836+ default : return std::nullopt ;
836837 }
837- return std::nullopt ;
838838}
839839
840840constexpr bool isValidDECMode (unsigned int mode) noexcept
You can’t perform that action at this time.
0 commit comments