ViewInternal: Review drop event
ClosedPublic

Authored by loh.tar on Mar 11 2019, 5:19 PM.

Details

Summary
  • Fix wrong after selection when multi line text is moved down
  • Allow drop into own area, but is only noticable when copy, not move
  • Code looks simpler, I think

Diff Detail

Lint
Lint Skipped
Unit
Unit Tests Skipped
loh.tar created this revision.Mar 11 2019, 5:19 PM
Restricted Application added projects: Kate, Frameworks. · View Herald TranscriptMar 11 2019, 5:19 PM
Restricted Application added subscribers: kde-frameworks-devel, kwrite-devel. · View Herald Transcript
loh.tar requested review of this revision.Mar 11 2019, 5:19 PM

Cursor is wrong placed after undo

I'm confused. Can't see how that has worket before this patch. I tend to add a cursor info to the m_dragInfo struct. Reset to that position just before editStart()

loh.tar updated this revision to Diff 53702.Mar 12 2019, 5:57 AM
loh.tar retitled this revision from [WIP] ViewInternal: Review drop event to ViewInternal: Review drop event.
loh.tar edited the summary of this revision. (Show Details)
  • Fix cursor position after undo...harr
  • Improve readability
  • More code comments
  • Autotest still looks good

These changhes sadly obscure slightly the patch diff

  • Update Summary/Title, I think patch its so far final now, beside...
  • Please see (and comment) code comments

TODO
Block mode after selection is buggy when mixed tab+spaces are involved.
But that should not be an issue of this patch, perhaps can't that never be fixed(?)

cullmann accepted this revision.Apr 12 2019, 7:46 PM
cullmann added a subscriber: cullmann.

+1, nice

Played a bit here with the new behavior, MUCH better than the old one.

For the block selection stuff: yes, tabs + spaces + block selection is messy, thought I think that is really an extreme corner case. If you find time and have an idea how to fix that, extra patches are welcome.

This should go in as is.

This revision is now accepted and ready to land.Apr 12 2019, 7:46 PM
This revision was automatically updated to reflect the committed changes.