Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Copy/Move Lines #1246

Closed
darwin4ever opened this issue Nov 1, 2019 · 8 comments · Fixed by #2261
Closed

Copy/Move Lines #1246

darwin4ever opened this issue Nov 1, 2019 · 8 comments · Fixed by #2261
Labels
help wanted Needs a volunteer to investigate/implement the issue Windows Relates to Windows OS

Comments

@darwin4ever
Copy link

A Clipboard line can be dragged to another tab.

  1. When a line is dragged, a "->" is shown while dragging which lets assume a "move" will be done, but next to a new line in the destination tab, the original line is NOT removed

  2. When a line is [CTRL]-dragged, a "+" is shown while dragging which lets assume a "add" will be done. Actually it results in exactly as 1)

@hluk
Copy link
Owner

hluk commented Nov 2, 2019

but next to a new line in the destination tab

I don't understand this part.

If I understand correctly, the problem is that if you drag an item from a tab to a different tab without holding Ctrl (or any other modifier), the dragged item is not removed. Is that right?

Can you post which version of CopyQ are you using, what is your OS and ideally steps to reproduce this?

@darwin4ever
Copy link
Author

Sorry, my comment got messed up. And for some reason I can't edit it.

So correctly it should have been :

  1. When a line is dragged, a "->" is shown while dragging which lets assume a "move" will be done to the destination tab. Actually a new line in the destination tab is added, the original line is NOT removed

So yes : the dragged item is not removed

I'm using v3.9.2 on Win10 32-bit.

Reproducing :

  1. create TestTab1
  2. create entry in TestTab1
  3. create TestTab2
  4. drag entry from TestTab1 to TestTab2

@hluk
Copy link
Owner

hluk commented Nov 3, 2019

I currently cannot test it on Windows, but I don't see any "->" when dragging items (though this probably just depends on platform).

Is there any chance the item is pinned (it should have a gray bar on the right side)?

Is anything in the logs (F12 shortcut)?

@darwin4ever
Copy link
Author

The "->" and "+" are shown on the left side of the dragging-box. No way to include it in a screenshot.

The item is NOT pinned and there is nothing in the log after dragging the line is completed

@trysten
Copy link

trysten commented Jan 31, 2023

OP is confusing. I've attached an image of the arrow (which doesn't seem to be relevant). When dragging, the item is copied to the correct tab and remains on the original tab. My desired behavior is to move the item to the destination tab such that it is no longer on the original tab. I haven't found any way to do this by dragging with or without modifiers and resorted to creating custom commands to move items to tabs. I recall that previous versions behaved differently for me on Windows 10.

It doesn't seem like this is the intended behavior. Either way, a checkbox settings to set move/copy in preferences might make sense. I would look into patching after some direction from @hluk.
image

@hluk
Copy link
Owner

hluk commented Jan 31, 2023

Can you test with the latest version and provide steps to reproduce?

@hluk hluk added help wanted Needs a volunteer to investigate/implement the issue Windows Relates to Windows OS labels Jan 31, 2023
@trysten
Copy link

trysten commented Feb 10, 2023

I've isolated the bug. Items are copied (not moved) when option "Tab Tree" is unchecked. When "Tab Tree" is checked items are moved (not copied). Occurs in version 6.4.0 on Windows and Debian. I think move behavior should be the default. You should be able to reproduce by unchecking "Tab Tree" then drag-and-dropping items to a different tab.

Thank you for your time and effort.

hluk added a commit that referenced this issue Feb 11, 2023
With tab bar, items were always copied to the target tab and never
removed from the source tab.

Fixes #1246
@hluk
Copy link
Owner

hluk commented Feb 11, 2023

@trysten Thanks for finding the cause!

Pull request #2261 fixes the issue.

hluk added a commit that referenced this issue Feb 11, 2023
With tab bar, items were always copied to the target tab and never
removed from the source tab.

Fixes #1246
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Needs a volunteer to investigate/implement the issue Windows Relates to Windows OS
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants