Fix indent/deindent when only empty lines are selected
This commit is contained in:
parent
da9d099f3b
commit
0fe9683c0f
|
@ -787,8 +787,11 @@ void indent(Context& context, int)
|
||||||
sels.emplace_back(line, line);
|
sels.emplace_back(line, line);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
ScopedEdition edition(context);
|
if (not sels.empty())
|
||||||
insert<InsertMode::Insert>(buffer, sels, indent);
|
{
|
||||||
|
ScopedEdition edition(context);
|
||||||
|
insert<InsertMode::Insert>(buffer, sels, indent);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
template<bool deindent_incomplete = true>
|
template<bool deindent_incomplete = true>
|
||||||
|
@ -828,8 +831,11 @@ void deindent(Context& context, int)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
ScopedEdition edition(context);
|
if (not sels.empty())
|
||||||
erase(context.buffer(), sels);
|
{
|
||||||
|
ScopedEdition edition(context);
|
||||||
|
erase(context.buffer(), sels);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
template<ObjectFlags flags, SelectMode mode = SelectMode::Replace>
|
template<ObjectFlags flags, SelectMode mode = SelectMode::Replace>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user