Skip to content
Snippets Groups Projects
Commit 07cb53da authored by Marko Mecina's avatar Marko Mecina
Browse files

fix script block execution in editor for gtksourceview 3 and 4

parent 354efc04
Branches
No related tags found
No related merge requests found
...@@ -1444,24 +1444,22 @@ class CcsEditor(Gtk.Window): ...@@ -1444,24 +1444,22 @@ class CcsEditor(Gtk.Window):
mark = self.sourcemarks[textbuffer] mark = self.sourcemarks[textbuffer]
start = textbuffer.get_iter_at_mark(mark) start = textbuffer.get_iter_at_mark(mark)
else: else:
start = textbuffer.get_start_iter() # init start = textbuffer.get_start_iter()
self._set_play_mark(view, start)
#start = textbuffer.get_iter_at_line(iter.get_line()) mark = self.sourcemarks[textbuffer]
#end = textbuffer.get_end_iter()
stop = start.copy() # bp = textbuffer.forward_iter_to_source_mark(stop, "break")
bp = textbuffer.forward_iter_to_source_mark(stop, "break") #TODO bp = mark.next() # only works if no category is given!?
if bp is False: if bp is not None:
stop = textbuffer.get_end_iter()#end stop = textbuffer.get_iter_at_mark(bp)
else:
stop = textbuffer.get_end_iter()
""" dump line into console """ """ dump line into console """
line = textbuffer.get_text(start, stop, True) line = textbuffer.get_text(start, stop, True)
line += str('\n\n') line += str('\n\n')
# self.ipython_view.text_buffer.insert_at_cursor(line, len(line))
# self.ipython_view._processLine()
#self._to_console(line, editor_read=True)
self._to_console_via_socket(line) self._to_console_via_socket(line)
self._set_play_mark(view, stop) self._set_play_mark(view, stop)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment