Skip to content

Commit 6527c1f

Browse files
committed
messages: Show headers if is_search_narrow().
Previously, when text searching, messages appear adjacently under the same heading, this can be confusing since they appear sequentially but there may be messages inbetween that don't meet the search criteria. Fixes zulip#1550.
1 parent dc4d9bc commit 6527c1f

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

zulipterminal/ui_tools/messages.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,14 @@ def need_recipient_header(self) -> bool:
121121
if len(self.model.narrow) == 2 and self.model.narrow[1][0] == "topic":
122122
return False
123123

124+
if self.model.is_search_narrow():
125+
if len(self.model.narrow) == 1:
126+
return True
127+
if len(self.model.narrow) == 2:
128+
return self.message["type"] != "private"
129+
if len(self.model.narrow) == 3:
130+
return self.model.narrow[1][0] != "topic"
131+
124132
last_msg = self.last_message
125133
if self.message["type"] == "stream":
126134
return not (

0 commit comments

Comments
 (0)