tmux-python / libtmux

⚙️ Python API / wrapper for tmux
https://libtmux.git-pull.com
MIT License
1.01k stars 104 forks source link

Fix window deletion from session #503

Closed Moysenko closed 7 months ago

Moysenko commented 10 months ago
  1. Based on isintance(target_window, int), I made corrections to typing. Also added is not None to if target_window just in case of target_window == 0
  2. Case 2 from man http://man.openbsd.org/OpenBSD-current/man1/tmux.1#:~:text=target%2D-,window,-(or%20src%2Dwindow was incorrectly implemented. There should be the current session, not the current window
  3. If no argument is passed, old implementation of kill_window just crashed. I fixed it
  4. Added test and docs
CLAassistant commented 10 months ago

CLA assistant check
All committers have signed the CLA.

codecov[bot] commented 10 months ago

Codecov Report

Merging #503 (b172f49) into master (b2302c8) will increase coverage by 0.11%. The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master     #503      +/-   ##
==========================================
+ Coverage   88.84%   88.96%   +0.11%     
==========================================
  Files          35       35              
  Lines        3514     3524      +10     
  Branches      484      487       +3     
==========================================
+ Hits         3122     3135      +13     
+ Misses        284      283       -1     
+ Partials      108      106       -2     
Files Coverage Δ
src/libtmux/session.py 77.83% <100.00%> (+1.71%) :arrow_up:
tests/test_session.py 97.23% <100.00%> (+0.12%) :arrow_up:

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more