Skip to content

Commit

Permalink
GRAPHICS: MACGUI: Syncronise internal state when selection is cut
Browse files Browse the repository at this point in the history
  • Loading branch information
sev- committed Aug 15, 2017
1 parent b9a7f2c commit df7bd30
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion graphics/macgui/mactextwindow.cpp
Expand Up @@ -264,8 +264,11 @@ Common::String MacTextWindow::cutSelection() {
}

int selPos = selStart - _inputText.c_str();
Common::String newInput = Common::String(_inputText.c_str(), selPos) + Common::String(_inputText.c_str() + selPos + selection.size());

_inputText = Common::String(_inputText.c_str(), selPos) + Common::String(_inputText.c_str() + selPos + selection.size());
clearSelection();
clearInput();
appendInput(newInput);

return selection;
}
Expand Down

0 comments on commit df7bd30

Please sign in to comment.