Skip to content
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

Removed wrong line counter #17

Merged
merged 1 commit into from
Nov 6, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions fastHistory/pick/pageGeneric.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,6 @@ def draw_marked_string(self, text, words_to_mark, color_default=1, color_marked=
:return: the number of lines printed
"""

count_new_lines = 0
for section in self.find_sections_to_mark(text, words_to_mark, case_sensitive, recursive):
if not section[self.INDEX_SECTION_IS_MARKED]:
color = color_default
Expand All @@ -109,8 +108,6 @@ def draw_marked_string(self, text, words_to_mark, color_default=1, color_marked=
unprinted = self.drawer.draw_row(unprinted, color=color, return_unprinted=True)
if unprinted != "":
self.drawer.new_line(x=multi_lines_index)
count_new_lines += 1
return count_new_lines

def draw_option(self, option, search_filters, context_shift, last_column_size=0, selected=False):
"""
Expand Down
10 changes: 4 additions & 6 deletions fastHistory/pick/pageInfo.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,17 +123,15 @@ def draw_info_tags(self, tags, filter_tags):
if tags is not None and len(tags) > 0:
for tag in tags:
self.drawer.draw_row(self.CHAR_TAG, color=self.drawer.color_hash_tag)
count_printed_lines = self.draw_marked_string(tag, filter_tags,
color_marked=self.drawer.color_search,
multi_lines=True,
multi_lines_index=self.INDENT)
self.cursor_y += count_printed_lines
self.draw_marked_string(tag, filter_tags,
color_marked=self.drawer.color_search,
multi_lines=False,
multi_lines_index=self.INDENT)
self.drawer.draw_row(self.CHAR_SPACE)
else:
self.drawer.draw_row("[", color=self.drawer.color_hash_tag)
self.drawer.draw_row(self.MESSAGE_NO_TAG)
self.drawer.draw_row(self.CHAR_TAG + "]", color=self.drawer.color_hash_tag)
self.cursor_y += 1
self.drawer.new_line()
self.cursor_y += 1

Expand Down