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

Find all in log file does not work properly with lines copied from the same log file #213

Closed
Kittyfisto opened this issue Aug 23, 2019 · 2 comments
Labels

Comments

@Kittyfisto
Copy link
Owner

Kittyfisto commented Aug 23, 2019

Current behaviour

If the pasted/entered line contains leading tabs, then "find all in log file" does not find ANY result

Expected behaviour

Since the search term was copied from the file, searching for it should reveal all lines with the same content (so at least one line), but never zero.

Steps to reproduce the problem

  1. Open a log file which contains log lines with leading tabs
  2. Select a log line in the log with leading tabs
  3. Copy the log line (strg+c)
  4. Paste the copied line to the "find all in log file" field (strg+v)
@Kittyfisto Kittyfisto added the bug label Aug 23, 2019
@Kittyfisto
Copy link
Owner Author

This issue is caused by WPF TextBoxes converting tab characters into a single by default. Copy & pasting a string such as "\tFoo" into such a TextBox causes it to be converted into " Foo" which is then propagated to the rest of the application. This in turn causes searches / filters to filter for the wrong white-space character which in turn causes the search / filter to behave wrong.

The solution is to set the "AcceptsTab" property of those TextBoxes to "True". This requires a patch for Metrolib since the latter provides some custom controls (for example FilterTextbox) which hide their inner TextBox.

Kittyfisto added a commit that referenced this issue Oct 30, 2019
Without this change, tab characters were converted to single spaces, thus leading to searching for the wrong string.
@Kittyfisto
Copy link
Owner Author

Fixed with v0.9.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant