fixup! Support discontinuous selections in command input API

This commit is contained in:
Allan Odgaard
2015-03-23 11:27:11 +07:00
parent 808aaabc44
commit 491ef65e65

View File

@@ -1341,7 +1341,7 @@ namespace ng
bool editor_t::handle_result (std::string const& uncheckedOut, output::type placement, output_format::type format, output_caret::type outputCaret, ng::ranges_t const& inputRanges, std::map<std::string, std::string> environment)
{
std::string const& out = utf8::is_valid(uncheckedOut.begin(), uncheckedOut.end()) ? uncheckedOut : sanitized_utf8(uncheckedOut);
ng::range_t inputRange = inputRanges.last();
ng::range_t inputRange = inputRanges ? inputRanges.last() : ng::range_t();
if(inputRanges.size() != 1 && format == output_format::text && placement != output::replace_document)
{