Implement terminal pane drag and drop overrides

This commit is contained in:
Kirill Bulatov 2024-01-07 02:21:43 +02:00
parent c4e306162c
commit 518868a12f
4 changed files with 103 additions and 59 deletions

View file

@ -27,11 +27,11 @@ use futures::{
use gpui::{
actions, canvas, div, impl_actions, point, size, Action, AnyElement, AnyModel, AnyView,
AnyWeakView, AnyWindowHandle, AppContext, AsyncAppContext, AsyncWindowContext, BorrowWindow,
Bounds, Context, Div, DragMoveEvent, Element, Entity, EntityId, EventEmitter, ExternalPaths,
FocusHandle, FocusableView, GlobalPixels, InteractiveElement, IntoElement, KeyContext,
LayoutId, ManagedView, Model, ModelContext, ParentElement, PathPromptOptions, Pixels, Point,
PromptLevel, Render, Size, Styled, Subscription, Task, View, ViewContext, VisualContext,
WeakView, WindowBounds, WindowContext, WindowHandle, WindowOptions,
Bounds, Context, Div, DragMoveEvent, Element, Entity, EntityId, EventEmitter, FocusHandle,
FocusableView, GlobalPixels, InteractiveElement, IntoElement, KeyContext, LayoutId,
ManagedView, Model, ModelContext, ParentElement, PathPromptOptions, Pixels, Point, PromptLevel,
Render, Size, Styled, Subscription, Task, View, ViewContext, VisualContext, WeakView,
WindowBounds, WindowContext, WindowHandle, WindowOptions,
};
use item::{FollowableItem, FollowableItemHandle, Item, ItemHandle, ItemSettings, ProjectItem};
use itertools::Itertools;
@ -544,11 +544,7 @@ impl Workspace {
weak_handle.clone(),
project.clone(),
pane_history_timestamp.clone(),
Some(Arc::new(|a, _| {
a.downcast_ref::<ExternalPaths>().is_some()
|| a.downcast_ref::<DraggedTab>().is_some()
|| a.downcast_ref::<ProjectEntryId>().is_some()
})),
None,
cx,
)
});