# # patch "view.ml" # from [2801849193023666f7e63c8acd19fc25b20b6a90] # to [1751af2693c82c4b5e44108a29602e78f0dae589] # --- view.ml +++ view.ml @@ -887,13 +887,13 @@ Canvas.center_on v n | _ -> let candidates = - if is_id q - then locate_id v q - else if is_date q - then locate_date v q - else - try locate_tag v (Str.regexp q) - with Failure _ -> [] in + try + if is_id q + then locate_id v q + else if is_date q + then locate_date v q + else locate_tag v (Str.regexp q) + with Failure _ | Invalid_argument _ -> [] in match candidates with | [] -> v.find.last_find <- (q, []) @@ -965,6 +965,19 @@ Branch_selector.connect v (handle_query v) ; + begin + let clipboard = GData.clipboard Gdk.Atom.primary in + ignore + (v.canvas.w#event#connect#button_press + (function + | b when GdkEvent.Button.button b = 2 -> + may + (Signal.emit v.find.find_signal) + clipboard#text ; + true + | _ -> false)) + end ; + connect_event v (function | `NODE_SELECT id -> Canvas.display_selection_marker v id ;