import sublime
import os

def getSetting(key,default=None):
	s = sublime.load_settings("Fuse.sublime-settings")
	return s.get(key, default)

def getFusePathFromSettings():
	path = getSetting("fuse_path_override")
	if path == "" or path == None:
		return "fuse"
	else:
		return path+"/fuse"

def setSetting(key,value):
	s = sublime.load_settings("Fuse.sublime-settings")
	s.set(key, value)
	sublime.save_settings("Fuse.sublime-settings")

def isSupportedSyntax(syntaxName):	
	return syntaxName == "Uno" or syntaxName == "UX"

def getExtension(path):
	base = os.path.basename(path)
	ext = os.path.splitext(base)

	if ext is None:
		return ""
	else:
		return ext[0]

def getRowCol(view, pos):
	rowcol = view.rowcol(pos)
	rowcol = (rowcol[0] + 1, rowcol[1] + 1)
	return {"Line": rowcol[0], "Character": rowcol[1]}

import sublime
import os

def getSetting(key,default=None):
	s = sublime.load_settings("Fuse.sublime-settings")
	return s.get(key, default)

def getFusePathFromSettings():
	path = getSetting("fuse_path_override")
	if path == "" or path == None:
		return "fuse"
	else:
		return path+"/fuse"

def setSetting(key,value):
	s = sublime.load_settings("Fuse.sublime-settings")
	s.set(key, value)
	sublime.save_settings("Fuse.sublime-settings")

def isSupportedSyntax(syntaxName):	
	return syntaxName == "Uno" or syntaxName == "UX"

def getExtension(path):
	if path is None:
		return ""
		
	base = os.path.basename(path)
	ext = os.path.splitext(base)

	if ext is None:
		return ""
	else:
		return ext[0]

def getRowCol(view, pos):
	rowcol = view.rowcol(pos)
	rowcol = (rowcol[0] + 1, rowcol[1] + 1)
	return {"Line": rowcol[0], "Character": rowcol[1]}

Handle that Path can be none
Handle that Path can be none

  import sublime
  import os
  
  def getSetting(key,default=None):
  	s = sublime.load_settings("Fuse.sublime-settings")
  	return s.get(key, default)
  
  def getFusePathFromSettings():
  	path = getSetting("fuse_path_override")
  	if path == "" or path == None:
  		return "fuse"
  	else:
  		return path+"/fuse"
  
  def setSetting(key,value):
  	s = sublime.load_settings("Fuse.sublime-settings")
  	s.set(key, value)
  	sublime.save_settings("Fuse.sublime-settings")
  
  def isSupportedSyntax(syntaxName):	
  	return syntaxName == "Uno" or syntaxName == "UX"
  
  def getExtension(path):
+ 	if path is None:
+ 		return ""
+ 		
  	base = os.path.basename(path)
  	ext = os.path.splitext(base)
  
  	if ext is None:
  		return ""
  	else:
  		return ext[0]
  
  def getRowCol(view, pos):
  	rowcol = view.rowcol(pos)
  	rowcol = (rowcol[0] + 1, rowcol[1] + 1)
  	return {"Line": rowcol[0], "Character": rowcol[1]}
  
Handle that Path can be none
## Code Before:
import sublime
import os

def getSetting(key,default=None):
	s = sublime.load_settings("Fuse.sublime-settings")
	return s.get(key, default)

def getFusePathFromSettings():
	path = getSetting("fuse_path_override")
	if path == "" or path == None:
		return "fuse"
	else:
		return path+"/fuse"

def setSetting(key,value):
	s = sublime.load_settings("Fuse.sublime-settings")
	s.set(key, value)
	sublime.save_settings("Fuse.sublime-settings")

def isSupportedSyntax(syntaxName):	
	return syntaxName == "Uno" or syntaxName == "UX"

def getExtension(path):
	base = os.path.basename(path)
	ext = os.path.splitext(base)

	if ext is None:
		return ""
	else:
		return ext[0]

def getRowCol(view, pos):
	rowcol = view.rowcol(pos)
	rowcol = (rowcol[0] + 1, rowcol[1] + 1)
	return {"Line": rowcol[0], "Character": rowcol[1]}

## Instruction:
Handle that Path can be none
## Code After:
import sublime
import os

def getSetting(key,default=None):
	s = sublime.load_settings("Fuse.sublime-settings")
	return s.get(key, default)

def getFusePathFromSettings():
	path = getSetting("fuse_path_override")
	if path == "" or path == None:
		return "fuse"
	else:
		return path+"/fuse"

def setSetting(key,value):
	s = sublime.load_settings("Fuse.sublime-settings")
	s.set(key, value)
	sublime.save_settings("Fuse.sublime-settings")

def isSupportedSyntax(syntaxName):	
	return syntaxName == "Uno" or syntaxName == "UX"

def getExtension(path):
	if path is None:
		return ""
		
	base = os.path.basename(path)
	ext = os.path.splitext(base)

	if ext is None:
		return ""
	else:
		return ext[0]

def getRowCol(view, pos):
	rowcol = view.rowcol(pos)
	rowcol = (rowcol[0] + 1, rowcol[1] + 1)
	return {"Line": rowcol[0], "Character": rowcol[1]}
