@@ -247,6 +247,38 @@ Corresponding calls added to Editor::KeyCommand():
247247 ...
248248 NotifyLineCountChanged();
249249 break;
250+
251+ ...
252+
253+ New code around DropAt()-call:
254+
255+ position = positionAfterDeletion;
256+
257+ *const int linesTotal = pdoc->LinesTotal();*
258+ std::string convertedText = Document::TransformLineEnds(value, lengthValue, pdoc->eolMode);
259+
260+ ...
261+
262+ if (rectangular) {
263+ PasteRectangular(position, convertedText.c_str(), static_cast<int>(convertedText.length()));
264+ // Should try to select new rectangle but it may not be a rectangle now so just select the drop position
265+ SetEmptySelection(position);
266+ } else {
267+ position = MovePositionOutsideChar(position, sel.MainCaret() - position.Position());
268+ position = SelectionPosition(InsertSpace(position.Position(), position.VirtualSpace()));
269+ const int lengthInserted = pdoc->InsertString(
270+ position.Position(), convertedText.c_str(), static_cast<int>(convertedText.length()));
271+ if (lengthInserted > 0) {
272+ SelectionPosition posAfterInsertion = position;
273+ posAfterInsertion.Add(lengthInserted);
274+ SetSelection(posAfterInsertion, position);
275+ }
276+ }
277+ *if (pdoc->LinesTotal() != linesTotal) {
278+ NotifyLineCountChanged();
279+ }*
280+
281+
250282[ /** "Update gutter width"-feature** ]
251283
252284[ ** Drag & drop improvement #63 ** ]
0 commit comments