Just as an experiment, I tried a few things and discovered that it re-attains it’s is_widget
setting if you show the input panel again (it re-uses the same view object). Although, it loses the syntax that was set, so it’s not a valid workaround.
>>> v = window.show_input_panel('test', '', None, None, None)
>>> print(v.settings().get('is_widget'), v.settings().get('syntax'), v.id(), v.settings().get('gutter'))
True Packages/Text/Plain text.tmLanguage 3 False
>>> v.assign_syntax('Packages/Python/Python.sublime-syntax')
>>> print(v.settings().get('is_widget'), v.settings().get('syntax'), v.id(), v.settings().get('gutter'))
None Packages/Python/Python.sublime-syntax 3 True
>>> v2 = window.show_input_panel('test', '', None, None, None)
>>> print(v2.settings().get('is_widget'), v2.settings().get('syntax'), v2.id(), v2.settings().get('gutter'), v == v2)
True Packages/Text/Plain text.tmLanguage 3 False True
So it looks like there is some internal logic that shows the gutter and removes the is_widget
setting when a syntax definition is applied to the view