| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Documentation build overview8 files changed · ± 8 modified ± Modified |
Sorry, something went wrong.
dupwin() returns a new window that is an independent duplicate of an existing one -- same size, position, contents and attributes, but with its own cell buffer, so changes to one do not affect the other. Unlike subwin()/derwin(), which share the parent's buffer, the duplicate has no parent. copywin() is not added: its explicit-rectangle copy is already available through the six-coordinate forms of window.overlay() and window.overwrite(). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
| Back | FazBrowse Home | New Git URL |
Add curses.window.dupwin(), the only window-duplication primitive still missing from the curses module. 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. Unlike subwin()/derwin(), which create a view that shares the parent's cell buffer, the duplicate has no parent.
copywin() is intentionally not added. Its full explicit-rectangle copy is already available through the six-coordinate forms of window.overlay() and window.overwrite(), which call copywin() internally with the overlay flag fixed (non-destructive vs. destructive); a separate copywin() would only re-expose that same operation with the flag as a runtime argument, so it adds no capability.