-
-
Notifications
You must be signed in to change notification settings - Fork 36.1k
Add curses.window.dupwin() #152258
Copy link
Copy link
Closed
Labels
extension-modulesC modules in the Modules dirC modules in the Modules dirtype-featureA feature request or enhancementA feature request or enhancement
Description
Activity
Metadata
Metadata
Assignees
Labels
extension-modulesC modules in the Modules dirC modules in the Modules dirtype-featureA feature request or enhancementA feature request or enhancement
Projects
- StatusShow more project fieldsDone
The curses module exposes most of the X/Open window operations, but
dupwin()is still missing. It is the only window-duplication primitive: it returns a new window that is an exact, independent copy of an existing one (same size, position, contents and attributes), with its own cell buffer, so later changes to one do not affect the other. This differs fromsubwin()/derwin(), which create a view that shares the parent's cell buffer.copywin()is intentionally left out. Its full explicit-rectangle copy is already available through the six-coordinate forms ofwindow.overlay()andwindow.overwrite(), which callcopywin()internally with the overlay flag fixed (non-destructive vs. destructive). A separatecopywin()would only re-expose that same operation with the flag as a runtime argument, so it adds no capability.Proposed API:
Linked PRs