Example #1
0
def start():
	colors.cache(args)
	root.render()

	try:
		#if args.lesh:
		#	something = root.root['lesh'].command_line
		#else:
		something = root.root['some program'].ch.statements.items[1]

		root.cursor_c, root.cursor_r = project.find(something, root.lines)
		#root.cursor_c += 1
	except Exception as e:
		log (e.__repr__(), ", cant set initial cursor position")

	#import parser_test
	#parser_test.test(root.root['some program'].ch.statements.items[0])



	if args.load:
		load(args.load)

	if args.run:
		load(args.run)
		root.root['loaded program'].run()

	if args.replay:
		do_replay(False)
Example #2
0
	def do_post_render_move_cursor(s):
		if isinstance(s.root.post_render_move_caret, int):
			s.move_cursor_h(s.root.post_render_move_caret)
		else: #its a node
			log("moving cursor to " +str(s.root.post_render_move_caret))
			s.cursor_c, s.cursor_r = project.find(s.root.post_render_move_caret, s.lines)
		s.root.post_render_move_caret = 0
Example #3
0
	def complete_arrows(self, arrows):
		if not self.arrows_visible:
			return []
		r = []
		for a in arrows:
			target = project.find(a[2], self.lines)
			if target:
				r.append(((a[0],a[1] - self.scroll_lines),target))
		return r
Example #4
0
def try_move_cursor(n):
	l = project.find(n, root.lines)
	if l:
		root.cursor_c, root.cursor_r = l