Commit 29f376a6 authored by Sylvain Dailler's avatar Sylvain Dailler

why3ide: fix crash when scrolling has bad column argument

parent 6e7da06a
......@@ -1027,7 +1027,10 @@ let current_cursor_loc = ref None
let move_to_line ?(character=0) ~yalign (v : GSourceView.source_view) line =
let line = max 0 (line - 1) in
let line = min line v#buffer#line_count in
let it = v#buffer#get_iter (`LINECHAR (line, character)) in
(* Warning : Do not use LINECHAR here as it fails when there is not enough
char on the line. *)
let it = v#buffer#get_iter (`LINE line) in
let it = it#forward_chars character in
v#buffer#place_cursor ~where:it;
let mark = `MARK (v#buffer#create_mark it) in
(* Make the left side of the code always visible *)
......@@ -2140,7 +2143,6 @@ let (_: GMenu.menu_item) =
~tooltip:"After find cursor ident, return back to cursor"
~callback:get_back_loc
(* "Tools" menu items *)
let tools_menu = factory#add_submenu "_Tools"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment