Skip to content

Commit

Permalink
Fix(prompt.py): Textualize#2994
Browse files Browse the repository at this point in the history
  • Loading branch information
paperplane110 committed Nov 11, 2024
1 parent 43d3b04 commit fa92aa7
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions rich/prompt.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import sys
from typing import Any, Generic, List, Optional, TextIO, TypeVar, Union, overload

from . import get_console
Expand Down Expand Up @@ -290,6 +291,9 @@ def __call__(self, *, default: Any = ..., stream: Optional[TextIO] = None) -> An
self.pre_prompt()
prompt = self.make_prompt(default)
value = self.get_input(self.console, prompt, self.password, stream=stream)
if ("readline" in sys.modules) and (value == ""):

print("")
if value == "" and default != ...:
return default
try:
Expand Down

0 comments on commit fa92aa7

Please sign in to comment.