Commits

abudden committed 45e133b

Bug fix for source directory location when one of the explicit locations is set to 'None' (fixes #223).

Comments (0)

Files changed (3)

autoload/TagHighlight/Find.vim

 " Tag Highlighter:
 "   Author:  A. S. Budden <abudden _at_ gmail _dot_ com>
-"   Date:    02/08/2011
+"   Date:    05/08/2011
 " Copyright: Copyright (C) 2009-2011 A. S. Budden
 "            Permission is hereby granted to use and distribute this code,
 "            with or without modifications, provided that this copyright
 	let result = {}
 
 	for search_mode in search_priority
-		if search_mode == 'Explicit' && explicit_location != 'NONE'
+		if search_mode == 'Explicit' && explicit_location != 'None'
 			" Use explicit location, overriding everything else
 			call TagHLDebug('Using explicit location', 'Information')
 			let result['Directory'] = explicit_location
 
 	if ! has_key(result, 'Directory')
 		call TagHLDebug("Couldn't find path", 'Warning')
-		let result = {'Found': 0}
+		let result = {'Found': 0, 'Exists': 0}
 	endif
 
 	return result

autoload/TagHighlight/Generation.vim

 " Tag Highlighter:
 "   Author:  A. S. Budden <abudden _at_ gmail _dot_ com>
-"   Date:    02/08/2011
+"   Date:    05/08/2011
 " Copyright: Copyright (C) 2009-2011 A. S. Budden
 "            Permission is hereby granted to use and distribute this code,
 "            with or without modifications, provided that this copyright
 		" use that directory.  If not, but a tag file was found, use that
 		" directory.  If not, use the current directory.
 		call TagHLDebug("No source dir set", "Information")
-		if option_file_info['Found'] == 1
+		if option_file_info['Found'] == 1 && option_file_info['Exists'] == 1
 			call TagHLDebug("Using project config file directory", "Information")
 			let RunOptions['SourceDir'] = option_file_info['Directory']
-		elseif types_file_info['Found'] == 1
+		elseif types_file_info['Found'] == 1 && types_file_info['Exists'] == 1
 			call TagHLDebug("Using types file directory", "Information")
 			let RunOptions['SourceDir'] = types_file_info['Directory']
-		elseif tag_file_info['Found'] == 1
+		elseif tag_file_info['Found'] == 1 && tag_file_info['Exists'] == 1
 			call TagHLDebug("Using tags file directory", "Information")
 			let RunOptions['SourceDir'] = tag_file_info['Directory']
 		else

doc/TagHighlight.txt

 ==============================================================================
 7. TagHighlight History                *TagHighlight-history*               {{{1
 
+2.0.14: 5th August 2011    : Bug fix for selection of source directory.  If
+                             one of the explicit locations was set to 'None',
+                             it was using 'None' as the source dir location.
+
 2.0.13: 4th August 2011    : Improvements to directory searching (mainly for
                              Cygwin).  Addition of option to include timestamp
                              in debug log (Vim debug output only at present).
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.