-
-
Notifications
You must be signed in to change notification settings - Fork 273
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Focus_Index_Before_Search doesn't work as intended #975
Comments
@neiljp Also, wanted to ask if this feature is necessary because if you press |
@zulipbot add "further discussion required" |
ERROR: Label "further discussion needed" does not exist and was thus not added to this issue. |
@zulipbot add "further discussion required" |
This commit fixes a bug which causes Zulip to crash when searching Streams or Topics. This happens because when a search result is empty, log is empty and because an empty ListWalker returns None, it leads to a Type error when setting focus. This is fixed by adding a boolean `in_search_mode` which does not call `get_focus` untill the search is over. Slight reordering was done in `__init__` to fit the boolean in an ideal place w.r.t. readability. Incidentally, the same commit also corrects what the code for `focus_index_before_search` was intended to do. Fixes zulip#923 and Fixes zulip#975
This commit fixes a bug which causes Zulip to crash when searching Streams or Topics. This happens because when a search result is empty, log is empty and because an empty ListWalker returns None, it leads to a Type error when setting focus. This is fixed by adding a boolean `in_search_mode` which does not call `get_focus` untill the search is over. Slight reordering was done in `__init__` to fit the boolean in an ideal place w.r.t. readability. Incidentally, the same commit also corrects what the code for `focus_index_before_search` was intended to do. Fixes zulip#923 and Fixes zulip#975
This commit corrects what the code for focus_index_before_search was intended to do. The focus index was still being updated even in the search results. This is fixed by adding a boolean `in_search_mode` which does not call `get_focus` untill the search is over. Slight reordering was done in `__init__` to fit the boolean in an ideal place w.r.t. readability. Fixes zulip#975
This commit corrects what the code for focus_index_before_search was intended to do. The focus index was still being updated even in the search results. This is fixed by adding a boolean `in_search_mode` which does not call `get_focus` untill the search is over. Slight reordering was done in `__init__` to fit the boolean in an ideal place w.r.t. readability. Fixes zulip#975
This commit corrects what the code for focus_index_before_search was intended to do. The focus index was still being updated even in the search results. This is fixed by adding a boolean `in_search_mode` which does not call `get_focus` untill the search is over. Slight reordering was done in `__init__` to fit the boolean in an ideal place w.r.t. readability. Fixes zulip#975
This commit corrects what the code for focus_index_before_search was intended to do. The focus index was still being updated even in the search results. This is fixed by moving `get_focus` into the SEARCH_STREAM/TOPIC conditional. Fixes zulip#975
This commit corrects what the code for focus_index_before_search was intended to do. The focus index was still being updated even in the search results. This is fixed by moving `get_focus` into the SEARCH_STREAM/TOPIC conditional. Fixes zulip#975
This commit corrects what the code for focus_index_before_search was intended to do. The focus index was still being updated even in the search results. This is fixed by moving `get_focus` into the SEARCH_STREAM/TOPIC conditional. Tests amended. Bad tests (`test_return_to_focus_after_search`) removed as they pass even though they don't do the right thing. Current tests fail before this commit. Fixes zulip#975
This commit corrects what the code for focus_index_before_search was intended to do. The focus index was still being updated even in the search results. This is fixed by moving `get_focus` into the SEARCH_STREAM/TOPIC conditional. Tests amended. Bad tests (`test_return_to_focus_after_search`) removed as they pass even though they don't do the right thing. Current tests fail before this commit. Fixes zulip#975
This commit corrects what the code for focus_index_before_search was intended to do. The focus index was still being updated even in the search results. This is fixed by moving `get_focus` into the SEARCH_STREAM/TOPIC conditional. Tests amended. Bad tests (`test_return_to_focus_after_search`) removed as they pass even though they don't do the right thing. Current tests fail before this commit. Fixes zulip#975
This commit corrects what the code for focus_index_before_search was intended to do. The focus index was still being updated even in the search results. This is fixed by moving `get_focus` into the SEARCH_STREAM/TOPIC conditional. Tests amended. Bad tests (`test_return_to_focus_after_search`) removed as they pass even though they don't do the right thing. Current tests fail before this commit. Fixes zulip#975
This commit corrects what the code for focus_index_before_search was intended to do. The focus index was still being updated even in the search results. This is fixed by moving `get_focus` into the SEARCH_STREAM/TOPIC conditional. Tests amended. Bad tests (`test_return_to_focus_after_search`) removed as they pass even though they don't do the right thing. Current tests fail before this commit. Fixes zulip#975
This commit corrects what the code for focus_index_before_search was intended to do. The focus index was still being updated even in the search results. This is fixed by moving `get_focus` into the SEARCH_STREAM/TOPIC conditional. Tests amended. Bad tests (`test_return_to_focus_after_search`) removed as they pass even though they don't do the right thing. Current tests fail before this commit. Fixes zulip#975.
This commit corrects what the code for focus_index_before_search was intended to do. The focus index was still being updated even in the search results. This is fixed by moving `get_focus` into the SEARCH_STREAM/TOPIC conditional. Tests amended. Bad tests (`test_return_to_focus_after_search`) removed as they pass even though they don't do the right thing. Current tests fail before this commit. Fixes #975.
Suppose one is currently focused on the 10th Stream. After "escaping" search it is expected that the focus is back on the 10th Stream but it rather focuses on the stream it was in focus during the search right before escaping.

This is also related to the crash in #923
The text was updated successfully, but these errors were encountered: