python / python/cpython

IDLE gets confused when switching between tabs and spaces.

未關閉
#142,107 4 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

還沒有人認領這個 Issue。

stdlib topic-IDLE type-bug
主要語言
Python
星號
77.2k
分支
35.9k
PR 合併指標
PR 指標待擷取

描述

Bug report

Bug description:

My IDLE is set to the default 4-space indent. When I switch to using tabs through whatever the keyboard for toggle-tabs, after the popup message, the tab key generates the tab character.

If I switch back to using spaces using the same keyboard shortcut, I find that the tab key generates eight spaces instead of the usual four. I don’t think that’s the intended behaviour.

This is fixed after restarting IDLE.

CPython versions tested on:

3.14

Operating systems tested on:

Windows 11 & macOS

貢獻指南

開啟貢獻指南

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

研究方向

在 Windows 11 或 macOS 上使用 Python 3.14,透過 toggle-tabs 鍵盤快速鍵將 IDLE 中的四個空格縮排切換為定位字元,然後再切換回來,以重現此問題。追蹤 toggle-tabs 的行為,並確認切換回空格後,Tab 鍵會產生四個空格,而不必重新啟動 IDLE。

由索引模型根據 Issue 內容生成。

評估

技術堆疊
python
領域
desktop, tooling
Issue 類型
缺陷
難度
3/5
預估耗時
1-2 天
活躍度
停滯
描述清晰度
基本清楚
新手友好度
45/100

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。