Unset the default Semantic Prompt line continuation environment variables (#5160)

* unset default multiline prompt pre/pos env vars

Allows xontribs to differentiate between an explicit user setting of an empty prefix vs. an unset value

* doc: add News item
This commit is contained in:
Evgeny 2023-06-30 11:27:29 +07:00 committed by GitHub
parent 2ff39e8e04
commit f303f0f395
Failed to generate hash of commit
2 changed files with 25 additions and 2 deletions

23
news/multil.rst Normal file
View file

@ -0,0 +1,23 @@
**Added:**
* <news item>
**Changed:**
* Unset the default line continuation environment variables (``$MULTILINE_PROMPT_PRE`` and ``$MULTILINE_PROMPT_POS``) to allow differentiating between user setting an empty value and not setting anything
**Deprecated:**
* <news item>
**Removed:**
* <news item>
**Fixed:**
* <news item>
**Security:**
* <news item>

View file

@ -1390,7 +1390,7 @@ class PromptSetting(Xettings):
is_string_or_callable, is_string_or_callable,
ensure_string, ensure_string,
ensure_string, ensure_string,
"", DefaultNotGiven,
"Indicator inserted before the line continuation marks set " "Indicator inserted before the line continuation marks set "
"in ``$MULTILINE_PROMPT``. Can be used to mark the start of " "in ``$MULTILINE_PROMPT``. Can be used to mark the start of "
"a semantic continuation prompt " "a semantic continuation prompt "
@ -1402,7 +1402,7 @@ class PromptSetting(Xettings):
is_string_or_callable, is_string_or_callable,
ensure_string, ensure_string,
ensure_string, ensure_string,
"", DefaultNotGiven,
"Indicator inserted after the line continuation marks set " "Indicator inserted after the line continuation marks set "
"in ``$MULTILINE_PROMPT``. Can be used to mark the end of " "in ``$MULTILINE_PROMPT``. Can be used to mark the end of "
"a semantic continuation prompt and the beginning of user input " "a semantic continuation prompt and the beginning of user input "