Skip to content

Commit c3953c2

Browse files
committed
Update InvokePrompt behavior (#12157)
1 parent 61cec15 commit c3953c2

File tree

4 files changed

+16
-8
lines changed

4 files changed

+16
-8
lines changed

reference/5.1/PSReadLine/About/about_PSReadLine_Functions.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -989,9 +989,11 @@ Similarly, you can use this with other operations, like `<Delete>` or
989989

990990
### InvokePrompt
991991

992-
Erases the current prompt and calls the prompt function to redisplay the
992+
Attempt to erase the current prompt and call the prompt function to redisplay the
993993
prompt. Useful for custom key handlers that change state. For example, change
994-
the current directory.
994+
the current directory. This method cannot overwrite a prompt that has left the
995+
screen buffer. Calls to InvokePrompt with no Y position argument will
996+
immediately return if the prompt cannot be overwritten.
995997

996998
- Function is unbound.
997999

reference/7.4/PSReadLine/About/about_PSReadLine_Functions.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1179,9 +1179,11 @@ Similarly, you can use this with other operations, like `<Delete>` or
11791179

11801180
### InvokePrompt
11811181

1182-
Erases the current prompt and calls the prompt function to redisplay the
1182+
Attempt to erase the current prompt and call the prompt function to redisplay the
11831183
prompt. Useful for custom key handlers that change state. For example, change
1184-
the current directory.
1184+
the current directory. This method cannot overwrite a prompt that has left the
1185+
screen buffer. Calls to InvokePrompt with no Y position argument will
1186+
immediately return if the prompt cannot be overwritten.
11851187

11861188
- Function is unbound.
11871189

reference/7.5/PSReadLine/About/about_PSReadLine_Functions.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1179,9 +1179,11 @@ Similarly, you can use this with other operations, like `<Delete>` or
11791179

11801180
### InvokePrompt
11811181

1182-
Erases the current prompt and calls the prompt function to redisplay the
1182+
Attempt to erase the current prompt and call the prompt function to redisplay the
11831183
prompt. Useful for custom key handlers that change state. For example, change
1184-
the current directory.
1184+
the current directory. This method cannot overwrite a prompt that has left the
1185+
screen buffer. Calls to InvokePrompt with no Y position argument will
1186+
immediately return if the prompt cannot be overwritten.
11851187

11861188
- Function is unbound.
11871189

reference/7.6/PSReadLine/About/about_PSReadLine_Functions.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1179,9 +1179,11 @@ Similarly, you can use this with other operations, like `<Delete>` or
11791179

11801180
### InvokePrompt
11811181

1182-
Erases the current prompt and calls the prompt function to redisplay the
1182+
Attempt to erase the current prompt and call the prompt function to redisplay the
11831183
prompt. Useful for custom key handlers that change state. For example, change
1184-
the current directory.
1184+
the current directory. This method cannot overwrite a prompt that has left the
1185+
screen buffer. Calls to InvokePrompt with no Y position argument will
1186+
immediately return if the prompt cannot be overwritten.
11851187

11861188
- Function is unbound.
11871189

0 commit comments

Comments
 (0)