public void addToNavHistory(SymitarFile file, int line){
		if(SuspendNavRecording || file == null) // Do not record navigation when this flag is set to true
			return;
		 // Switched tab
		if(currNavFile == null || !file.equals(currNavFile) && !file.equals(navHistory.get(currHistoryStep-1))){
			 // Truncate the navHistory arraylist if we are not at the end
			if(currHistoryStep < navHistory.size())
				navHistory.subList(currHistoryStep, navHistory.size()).clear(); 
			navHistory.add(new NavHistoryItem(file, line));
			currNavFile = file;
			currNavLine = line;
			currHistoryStep = navHistory.size();
		}
		// line number changed more than NAVIGATE_HISTORY_LINE_CHANGE lines
		else
			if(Math.abs(currNavLine - line) >= NAVIGATE_HISTORY_LINE_CHANGE){
				 // Truncate the navHistory arraylist if we are not at the end
				if(currHistoryStep < navHistory.size())
					navHistory.subList(currHistoryStep - 1, navHistory.size()).clear(); 
				navHistory.add(new NavHistoryItem(file, line));
				currNavLine = line;
				currHistoryStep = navHistory.size();
			}
		if(navHistory.size() > NAVIGATE_HISTORY_LIMIT)
			navHistory.remove(0); // Keep limit to NAVIGATE_HISTORY_LIMIT
	}