Author Topic: Behavior of View.SearchOutput  (Read 2763 times)

Offline Andreas

  • Registered User
  • Jr. Member
  • *
  • Posts: 53
  • Karma: +0/-0
    • View Profile
Behavior of View.SearchOutput
« on: October 04, 2014, 11:09:11 pm »
The command description of View.SearchOutput says: "Show/Hide Find Results pane. Menu path: View > Panes > Find Results".

Showing the Find Results pane does work fine. However, hiding the Find Results pane does not work.

When the Find Results pane is visible, I would like to hide it by means of the command View.SearchOutput. In other words: The command should toggle the visible/hidden state of the Find Results pane.

Offline alex

  • Developer
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2181
  • Karma: +37/-3
    • View Profile
    • HippoEDIT
Re: Behavior of View.SearchOutput
« Reply #1 on: October 05, 2014, 10:35:48 pm »
Hi Andreas,

the function works as designed. The description is wrong ;)
Correctly it shall be "Show/Activate Find Results pane". So, if pane is already shown, it will be activated and focus will be set on one of the elements inside of the pane. Any. I do not plan to change current behaviour. But prompt - yes.

I am afraid, there is no keyboard shortcut to close the pane. Any. I can evaluate general command for closing active (focused) pane, but will do it only if it is easy to implement - otherwise will be delayed.

BR, Alex.


Offline Andreas

  • Registered User
  • Jr. Member
  • *
  • Posts: 53
  • Karma: +0/-0
    • View Profile
Re: Behavior of View.SearchOutput
« Reply #2 on: October 06, 2014, 07:28:43 am »
the function works as designed

That's a pity. I have also tried the auto hide feature but soon found that it didn't work well for me. The pane often got hidden when I wanted it to stay visible, and it stayed visible when I wanted it to get hidden. So I came to the conclusion that the usability would be better for me if I could control the visibility of the pane by means of a keyboard shortcut (except for the case where I have used Find In Files before, in which case the pane should appear automatically). I use Find In Files a lot. In fact, the Find In Files feature was the initial reason why I switched from EmEditor to HippoEdit. (In HippoEdit, the Find In Files feature works faster than in EmEditor -- even though EmEditor claims to be the world's fastest editor. And the presentation of the find results is better in HippoEdit than in EmEditor.)


I can evaluate general command for closing active (focused) pane

I hope you'll be successful. In EditPad Pro, for example, you can close the Find Results pane by means of the Esc key. By the way, the command should close the pane in any case -- even if it's not active (focused).

Offline alex

  • Developer
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2181
  • Karma: +37/-3
    • View Profile
    • HippoEDIT
Re: Behavior of View.SearchOutput
« Reply #3 on: October 07, 2014, 11:20:02 pm »
I you need to have command to close the pane, if it is not active (focused) it can not be done as generic command. Generic means here: for any pane, so if it will not be for focused, how to find out which pane user want to close?

"Esc" is already hardcoded for some, modal actions as close of the completion list box or cancelling of the Code Hint tooltip.  But I do not see, how I can transparently to user bound this action also for closing of the Find Results window.

The only way I see now, is to introduce explicit command for closing of the pane as pair for all View.XXXPane commands. And maybe still, one general to close focused pane, while I do not want that user shall remember also explicit commands but still can close any pane, after activating it.

But still, I do not promise that I will add this soon: I am planing to release 1.51 this month, so, the main priority for me will be to fix all bugs before. And you know - there is enough to do.

Offline Andreas

  • Registered User
  • Jr. Member
  • *
  • Posts: 53
  • Karma: +0/-0
    • View Profile
Re: Behavior of View.SearchOutput
« Reply #4 on: October 08, 2014, 03:53:55 pm »
Hi Alex,

"Esc" was only an example. Any other key would also be fine. I just need a command which I can assign to a keyboard shortcut. And it would be good if the command toogled the pane's visibility, i.e. close the pane if it's open and open the pane if it's closed.

Explicit commands for specific panes would be fine. In fact I'm only interested in one specific command for the Find Results pane.

I fully agree that bug fixes have the highest priority. My wish for the Find Results pane is only related to comfort and convenience.

Best regards,
Andreas

Offline Andreas

  • Registered User
  • Jr. Member
  • *
  • Posts: 53
  • Karma: +0/-0
    • View Profile
Re: Behavior of View.SearchOutput
« Reply #5 on: October 21, 2014, 08:14:57 pm »
Hi Alex,

thank you very much for implementing this whish (and the other changes) in v1.51.38.

By the way, the issue Wrong/unexpected behavior of 'Copy Full Path'. More... is listed as "fixed", but it seems that it is not fixed. And on this page, "RegexpNotDotNewline" should be replaced with "RemoteDirCheckPeriod".

Best regards,
Andreas

Offline alex

  • Developer
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2181
  • Karma: +37/-3
    • View Profile
    • HippoEDIT
Re: Behavior of View.SearchOutput
« Reply #6 on: October 21, 2014, 08:46:18 pm »
Quote
By the way, the issue Wrong/unexpected behavior of 'Copy Full Path'. More...
It actually was fixed.. Probably was lost during source merge. Will bring it back in next build. Will be soon. Thanks a lot for retest!

Quote
And on this page, "RegexpNotDotNewline" should be replaced with "RemoteDirCheckPeriod".
Fixed.

Offline Andreas

  • Registered User
  • Jr. Member
  • *
  • Posts: 53
  • Karma: +0/-0
    • View Profile
Re: Behavior of View.SearchOutput
« Reply #7 on: December 07, 2014, 12:14:42 pm »
Currently I have two keyboard shortcuts for the Find Results pane: One to open it and another one to close it. But this is difficult to remember. Therefore, I would prefer one single keyboard shortcut which toggles the visibility of the Find Results pane. If the Find Results pane is open, pressing the key shall close it, and if Find Results pane is closed, pressing the key shall open it. I have tried to write a script for that purpose, but I ran into the following problems:

1. It seems to be impossible to determine in a script whether the Find Results pane is currently open or closed.
2. It seems to be impossible to assign a keyboard shortcut to a script (so that the script will be executed when the key is pressed).

Can these problems be solved somehow?

Alternatively, a new command which simply toggles the visibility of the Find Results pane would make things much easier.

Offline alex

  • Developer
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2181
  • Karma: +37/-3
    • View Profile
    • HippoEDIT
Re: Behavior of View.SearchOutput
« Reply #8 on: December 08, 2014, 06:54:59 pm »
Hi Andreas,

I was foreseen this request :) And actually was surprised that I have not yet answered why it is not done like that by default.
As I have already wrote, standard behaviour of the "open" commands already consumes toggle behaviour:
  • If you execute the command within text editor area (better to say: in any place except of the pane itself), the command will lead to opening of the pane, or activating (setting focus to it) it if it is already open.
  • If you execute command within the pane, it will bring you back to active text editor.

The use case: you activated tool pane, did some task there and jump back to document to continue editing.

But I have nothing against of creating user script (tool or service) for achieving this. IMHO it is a way to go.

Quote
1. It seems to be impossible to determine in a script whether the Find Results pane is currently open or closed.
You are right. I will extend IPane API to report, by new method reporting pane state. Will be available next build.

Quote
2. It seems to be impossible to assign a keyboard shortcut to a script (so that the script will be executed when the key is pressed).
It is impossible to achieve this automatically by calling some API from script. But it is possible by end user (this is how it is designed). So:
- if you create tool script, you can call it as any tool for syntax (Tools->Manage Tools). There is an option to assign a shortcut for tool.
- if you create a service script (plugin), you shall create/register a command object, and than you can assign shortcut to it as for any other command in Tools->Keyboard Settings.
You can use Scripting Tools plugin to simplify script creation.

BR, Alex.
« Last Edit: December 08, 2014, 06:56:40 pm by alex »

Offline Andreas

  • Registered User
  • Jr. Member
  • *
  • Posts: 53
  • Karma: +0/-0
    • View Profile
Re: Behavior of View.SearchOutput
« Reply #9 on: December 08, 2014, 07:59:50 pm »
  • If you execute command within the pane, it will bring you back to active text editor.

Okay, but that doesn't help me, because I want to close the Find Results pane and not just put the focus to the text editor.


- if you create tool script, you can call it as any tool for syntax (Tools->Manage Tools). There is an option to assign a shortcut for tool.

Perfect! I will do that (as soon as it's possible to retrieve the pane state.)

Thank you.

Offline alex

  • Developer
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2181
  • Karma: +37/-3
    • View Profile
    • HippoEDIT
Re: Behavior of View.SearchOutput
« Reply #10 on: December 13, 2014, 10:23:30 pm »
Hi Andreas,

try this script with 1.60.6:
Code: Javascript
  1. var pSearchResultsPane = Application.FindPane("SearchOutput", false);
  2. if ( pSearchResultsPane != null ) {
  3.         pSearchResultsPane.Open = !pSearchResultsPane.Open;
  4. }

I will update API wiki soon.

BR, Alex.

Offline Andreas

  • Registered User
  • Jr. Member
  • *
  • Posts: 53
  • Karma: +0/-0
    • View Profile
Re: Behavior of View.SearchOutput
« Reply #11 on: December 13, 2014, 11:19:58 pm »
Hi Alex,

thank you very much. By the way, in the Tool Properties dialog, when you remove the checkmark from the option 'Show in toolbar' and then click OK and then click OK again in the Manage Tools dialog, HippoEdit will crash.

Best regards,
Andreas

Offline alex

  • Developer
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2181
  • Karma: +37/-3
    • View Profile
    • HippoEDIT
Re: Behavior of View.SearchOutput
« Reply #12 on: December 14, 2014, 02:10:09 am »
Hi Andreas,

thanks. Reproduced - will be fixed in next build. Only happens if you have one tool.

BR, Alex.

 

Related Topics

  Subject / Started by Replies Last post
3 Replies
2525 Views
Last post February 23, 2009, 05:58:59 pm
by alex
2 Replies
2482 Views
Last post March 18, 2009, 11:09:34 am
by alex
0 Replies
1480 Views
Last post April 13, 2013, 11:52:08 pm
by alex
2 Replies
1496 Views
Last post September 01, 2014, 04:24:34 pm
by Andreas
1 Replies
1490 Views
Last post September 25, 2014, 11:53:11 am
by alex