Commits

abudden committed 45e133b

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

  • Participants
  • Parent commits 97ac6a0

Comments (0)

Files changed (3)

File 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

File 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

File 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).