On Sat, 1 Dec 2007 12:27:57 +0100 Enrico Tröger enrico.troeger@uvena.de wrote:
On Wed, 28 Nov 2007 10:21:27 +0100, Harold Aling h.aling@home.nl wrote:
Hi,
- The scope is only functional when the file is freshly saved (else
it's 'unknown')
Yes, this is a very strange bug, didn't find the cause yet.
When a file has no changes, tagmanager is used to lookup the tag parsed just before the 1st fold level above the cursor position. With changes, the scope has to be parsed from any identifiers the scintilla lexer has styled.
So the scope indication is not going to work perfectly. Currently it might be difficult to improve because the PHP lexer is quite complex (I think there are some unresolved issues with bracket styling for example).
Ideally, we would always use tagmanager, because it is designed to parse tags and categorize them, but there are two problems:
1. At the moment tagmanager works from files (can be fixed with some porting work - on the TODO as Enrico mentions).
2. When will we reparse the current file? TM parses are generally quite fast, but even so you probably wouldn't want a reparse too often. I suppose there could be a setting for reparsing when the scope has changed, based on cursor fold level changes.
Regards, Nick