MCPcopy Index your code
hub / github.com/python/cpython / change_indentwidth_event

Method change_indentwidth_event

Lib/idlelib/format.py:378–389  ·  view source on GitHub ↗
(self, event)

Source from the content-addressed store, hash-verified

376 return "break"
377
378 def change_indentwidth_event(self, event):
379 editwin = self.editwin
380 new = askinteger(
381 "Indent width",
382 "New indent width (2-16)\n(Always use 8 when using tabs)",
383 parent=editwin.text,
384 initialvalue=editwin.indentwidth,
385 minvalue=2,
386 maxvalue=16)
387 if new and new != editwin.indentwidth and not editwin.usetabs:
388 editwin.indentwidth = new
389 return "break"
390
391
392class Rstrip: # 'Strip Trailing Whitespace" on "Format" menu.

Callers 1

Calls 1

askintegerFunction · 0.90

Tested by 1