[PR #351] [MERGED] CtrlCore: drag and drop in line edit like ctrls now works as expected on macOS. #336

Closed
opened 2026-05-05 03:46:07 -06:00 by gitea-mirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ultimatepp/ultimatepp/pull/351
Author: @klugier
Created: 1/18/2026
Status: Merged
Merged: 1/18/2026
Merged by: @mirek-fidler

Base: masterHead: klugier/mac-fix-drag-and-drop-for-line-edit


📝 Commits (1)

  • d441404 CtrlCore: drag and drop in line edit now works as expected.

📊 Changes

1 file changed (+0 additions, -2 deletions)

View changed files

📝 uppsrc/CtrlCore/CocoClip.mm (+0 -2)

📄 Description

It looks like the drag and drop for functions that call DoDragAndDrop without providing data parameter doesn't work as expected. However, there are plenty places where it is called like that. For example CodeEditor is using it to move one block of code to another place. So, it should work...

I fix it simply. It looks like the following if was misleading:

	if(data.GetCount() == 0)
		return DND_NONE; // Cocoa crashes if there is nothing to drop

After removing this line everything starts to work as expected. Without any crashes.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/ultimatepp/ultimatepp/pull/351 **Author:** [@klugier](https://github.com/klugier) **Created:** 1/18/2026 **Status:** ✅ Merged **Merged:** 1/18/2026 **Merged by:** [@mirek-fidler](https://github.com/mirek-fidler) **Base:** `master` ← **Head:** `klugier/mac-fix-drag-and-drop-for-line-edit` --- ### 📝 Commits (1) - [`d441404`](https://github.com/ultimatepp/ultimatepp/commit/d441404095fadad55bb4ecb970f4ed854b83f94c) CtrlCore: drag and drop in line edit now works as expected. ### 📊 Changes **1 file changed** (+0 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `uppsrc/CtrlCore/CocoClip.mm` (+0 -2) </details> ### 📄 Description It looks like the drag and drop for functions that call DoDragAndDrop without providing data parameter doesn't work as expected. However, there are plenty places where it is called like that. For example CodeEditor is using it to move one block of code to another place. So, it should work... I fix it simply. It looks like the following if was misleading: ``` if(data.GetCount() == 0) return DND_NONE; // Cocoa crashes if there is nothing to drop ``` After removing this line everything starts to work as expected. Without any crashes. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
gitea-mirror 2026-05-05 03:46:07 -06:00
Sign in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: github-starred/ultimatepp#336
No description provided.