def getLastChar(window) -> tuple:
	"""
	Returns the last filled character in a window object.
	
	Arguments:
		window {curses.window} -- The window to check
	
	Returns:
		tuple (y,x) -- The (y,x) of the last filled character, relative to the window
	"""

	height, width = window.getmaxyx()
	for y in range(height-1, -1, -1):
		for x in range(width-1, -1, -1):
			if window.instr(y,x,1) != b' ':
				return(y,x)
	raise IndexError('No filled characters in window.')