+[8.50b2] "Search with Google" is not always worki
Moderators: Hacker, petermad, Stefan2, white
+[8.50b2] "Search with Google" is not always worki
While working with the new google search of Lister I have detected that in some cases it does not start the web browser to perform search.
I have done a little boundary check to understand this behavior.
I have done the following tests with different browser. Its always the same behavior.
My environment:
---------------------
1)WinXP 32 Bit SP3
2) Win8 64Bit
Steps:
---------
1) Create first text file with 228 times the character a
2) Create second text file with 229 times the character a
3) View the content of first file with Lister, select the whole chars and perform a google search
4) View the content of second file with Lister, select the whole chars and perform a google search
You will see that step 3 will work as expected.
Doing step 4 will not perform a google search.
Additional information:
1)
In my first environment (1) the Lister window is always freezing for about 10 seconds while doing step 4
2)
I have seen that selecting a text with more than 255 character will not show the context menu entry for doing google search. Is this an expected behavior? AFAIK Google allows more than 255 chars in a search query.
3)
I have checked the whole process with process monitor.
Both "step 3" and "step 4" start a new thread for doing the search.
While doing "step 3" I am able to see that my default browser is started by using the API ShellExecute.
While doing "step 4" the thread is terminated before it can call the API ShellExecute
Thanks,
Ferhat
I have done a little boundary check to understand this behavior.
I have done the following tests with different browser. Its always the same behavior.
My environment:
---------------------
1)WinXP 32 Bit SP3
2) Win8 64Bit
Steps:
---------
1) Create first text file with 228 times the character a
2) Create second text file with 229 times the character a
3) View the content of first file with Lister, select the whole chars and perform a google search
4) View the content of second file with Lister, select the whole chars and perform a google search
You will see that step 3 will work as expected.
Doing step 4 will not perform a google search.
Additional information:
1)
In my first environment (1) the Lister window is always freezing for about 10 seconds while doing step 4
2)
I have seen that selecting a text with more than 255 character will not show the context menu entry for doing google search. Is this an expected behavior? AFAIK Google allows more than 255 chars in a search query.
3)
I have checked the whole process with process monitor.
Both "step 3" and "step 4" start a new thread for doing the search.
While doing "step 3" I am able to see that my default browser is started by using the API ShellExecute.
While doing "step 4" the thread is terminated before it can call the API ShellExecute
Thanks,
Ferhat
- ghisler(Author)
- Site Admin
- Posts: 50541
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
I can reproduce the problem. There is currently an arbitrary limit of 255 characters, I don't know where 229 comes from. I will try to increase the limit a bit - I didn't expect that anyone would make a search for such a long string...
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
I have checked it with Beta 3 right now.
You have increased the limit but didn't fix the issue at all.
My opinion:
As long as I can see the entry "Search for selected text with Google" in the context menu I assume that I am able to search/ use this feature.
Currently this is not true when you select very long texts.
You have increased the limit but didn't fix the issue at all.
My opinion:
As long as I can see the entry "Search for selected text with Google" in the context menu I assume that I am able to search/ use this feature.
Currently this is not true when you select very long texts.
- ghisler(Author)
- Site Admin
- Posts: 50541
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
???
The menu items isn't shown now when the string is too long.
The menu items isn't shown now when the string is too long.
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
Not really....
Your fix works only for TC 32 Bit. The error is still existing inside TC 64Bit.
I have done the following tests:
Test 1:
-------------
1) Create a text file with 1000 chars e.g. 'aaaaa....'
2) Start TC 32Bit
3) Select 980 chars
4) Right click with mouse
observed:
The context menu entry is shown and is working very well!
If I select 981 chars the context menu entry is hidden.
Test 2:
-------------
1) Create a text file with 1000 chars e.g. 'aaaaa....'
2) Start TC 64Bit
3) Select 991 chars
4) Right click with mouse
observed:
The context menu entry is shown and its working but if you select 992 chars the context menu entry is still shown but clicking on "Search for selected text in Google" doesn't do anything!
Thanks,
Ferhat
Your fix works only for TC 32 Bit. The error is still existing inside TC 64Bit.
I have done the following tests:
Test 1:
-------------
1) Create a text file with 1000 chars e.g. 'aaaaa....'
2) Start TC 32Bit
3) Select 980 chars
4) Right click with mouse
observed:
The context menu entry is shown and is working very well!
If I select 981 chars the context menu entry is hidden.
Test 2:
-------------
1) Create a text file with 1000 chars e.g. 'aaaaa....'
2) Start TC 64Bit
3) Select 991 chars
4) Right click with mouse
observed:
The context menu entry is shown and its working but if you select 992 chars the context menu entry is still shown but clicking on "Search for selected text in Google" doesn't do anything!
Thanks,
Ferhat
- ghisler(Author)
- Site Admin
- Posts: 50541
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Ah, yes, I set the limit originally to 1000, but reduced it to 980 because the command is longer. Unfortunately I cannot predict the exact length, so it will just do nothing if the line becomes too long. This is intentional.
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
- ghisler(Author)
- Site Admin
- Posts: 50541
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
- ghisler(Author)
- Site Admin
- Posts: 50541
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Hi,
it's not fixed yet (correctly).
I have found a new way to reproduce it with TC 32 and 64Bit
Use the file which I have posted using pastebin.
http://pastebin.com/download.php?i=1P88WtTu
Steps:
1) Select the whole content
2) right click with mouse
3) choose google search....
observed:
the context menu entry appears but clicking on it does nothing.
it's not fixed yet (correctly).
I have found a new way to reproduce it with TC 32 and 64Bit
Use the file which I have posted using pastebin.
http://pastebin.com/download.php?i=1P88WtTu
Steps:
1) Select the whole content
2) right click with mouse
3) choose google search....
observed:
the context menu entry appears but clicking on it does nothing.
- ghisler(Author)
- Site Admin
- Posts: 50541
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
This is one of the rare cases where TC has to convert characters to %hex values. This can make the text longer than allowed. Unfortunately I cannot check this while the context menu is created, so you will have to live with it.
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
- ghisler(Author)
- Site Admin
- Posts: 50541
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact: