Author Topic: File extension confusion  (Read 13200 times)

Wanderer

  • Senior Community Member
  • Posts: 557
  • Hero Points: 23
File extension confusion
« on: October 17, 2007, 12:46:24 pm »
SlickEdit 12.0.3, WinXP.

I have a project containing mostly .c and .h files, with some .cpp.  When I use Search->Find Symbol, the correct source files is loaded, but the cursor isn't positioned on the symbol. 

Even more confusing: the file doesn't seem to be recognized as a .c or .h file, since it is not 'colorized'.

Tools->Options->File Extension Setup :  'fundamental' is selected.

I used to have .c files mapped to the 'ansic' extension, but I cleared the def_ansic_exts variable.  Do I need to somehow remove it altogether?

What's going on? 

Thanks for any ideas.


ScottW, VP of Dev

  • Senior Community Member
  • Posts: 1471
  • Hero Points: 64
Re: File extension confusion
« Reply #1 on: October 23, 2007, 02:13:30 pm »
Where does the cursor get positioned? In my testing, the cursor is positioned on the first non-whitespace character on the line. I've discussed changing this so that the cursor would be on the symbol, itself. But the team believes that too many people may be depending on the current behavior in scripts.

As for the color coding part, I don't follow what you mean when you say that you used to have.c files mapped to the 'ansic' extension. I don't see that extension listed. Was that a custom extension you added? When you open a .c file is it color coded properly? What I'm trying to get at is whether the color coding is only an issue when you do a Find Symbol. What is the extension of the file in question?


Wanderer

  • Senior Community Member
  • Posts: 557
  • Hero Points: 23
Re: File extension confusion
« Reply #2 on: October 23, 2007, 03:15:26 pm »
Where does the cursor get positioned? In my testing, the cursor is positioned on the first non-whitespace character on the line. I've discussed changing this so that the cursor would be on the symbol, itself. But the team believes that too many people may be depending on the current behavior in scripts.
The cursor is positioned at first line, first column, nowhere near the symbol.

Quote
As for the color coding part, I don't follow what you mean when you say that you used to have.c files mapped to the 'ansic' extension. I don't see that extension listed. Was that a custom extension you added?
The 'ansic' extension was added several versions ago, as I recall, as a way to allow different setting for .c and .cpp files.  It was enabled with the def_ansic_exts macro.  I believe that if you have never set that macro, 'ansic' won't show up in the Extension Settings dialog.

Quote
When you open a .c file is it color coded properly? What I'm trying to get at is whether the color coding is only an issue when you do a Find Symbol. What is the extension of the file in question?
Yes, if I open .c, .h, or .cpp file directly, it is color coded correctly.  It seems to only be an issue when opening a file via Search->Find Symbol.  I believe it only happen when the symbol is located in a .h file.

Thanks for the reply.

Dennis

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 3247
  • Hero Points: 461
Re: File extension confusion
« Reply #3 on: October 23, 2007, 10:31:07 pm »
If you go to Tools > Options > File Extension Setup..., and select the "h" extension, what does it show up as being referred to?  It should show "c", independent of what you have done with def_ansic_exts.  If you have changed it, that may be the problem. 

If that is not the problem, because I am unable to reproduce the issue, I suggest you send SlickEdit support a copy of your configuration directory and a small sample project that exhibits the problem, along with instructions for how we can reproduce the issue.

Wanderer

  • Senior Community Member
  • Posts: 557
  • Hero Points: 23
Re: File extension confusion
« Reply #4 on: October 24, 2007, 12:09:44 pm »
Both h and cpp refer to c.  The def_ansic_exts variable is empty.  Is there a way to 'remove' that variable?

Dennis

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 3247
  • Hero Points: 461
Re: File extension confusion
« Reply #5 on: October 24, 2007, 01:43:45 pm »
No way to remove the variable (and it wouldn't really make a difference anyway).

However, you can unload ansic.ex (which will remove some callbacks).
Let us know if that helps.

Wanderer

  • Senior Community Member
  • Posts: 557
  • Hero Points: 23
Re: File extension confusion
« Reply #6 on: October 24, 2007, 03:10:02 pm »
However, you can unload ansic.ex (which will remove some callbacks).
Let us know if that helps.
Macro->Unload Module... : unloaded ansic.ex, no difference.