Attention une mise à jour du serveur va être effectuée le vendredi 16 avril entre 12h et 12h30. Cette mise à jour va générer une interruption du service de quelques minutes.

Commit 8a999dee authored by Guillaume Melquiond's avatar Guillaume Melquiond

Disable auto-indenting on read-only buffers (fixes issue #102).

For some mind-boggling reason, gtksourceview's "smart" indenting is able
to modify a read-only buffer, so this commit disables indenting along
editing.
parent 30f07218
...@@ -520,7 +520,8 @@ let () = ...@@ -520,7 +520,8 @@ let () =
*) *)
Hstr.iter Hstr.iter
(fun _ (_,source_view,_,_) -> (fun _ (_,source_view,_,_) ->
source_view#set_editable gconfig.allow_source_editing) source_view#set_editable gconfig.allow_source_editing;
source_view#set_auto_indent gconfig.allow_source_editing)
source_view_table; source_view_table;
send_session_config_to_server () send_session_config_to_server ()
in in
...@@ -815,7 +816,7 @@ let create_source_view = ...@@ -815,7 +816,7 @@ let create_source_view =
~packing:scrolled_source_view#add () in ~packing:scrolled_source_view#add () in
let source_view = let source_view =
GSourceView2.source_view GSourceView2.source_view
~auto_indent:true ~auto_indent:gconfig.allow_source_editing
~insert_spaces_instead_of_tabs:true ~tab_width:2 ~insert_spaces_instead_of_tabs:true ~tab_width:2
~show_line_numbers:true ~show_line_numbers:true
~right_margin_position:80 ~show_right_margin:true ~right_margin_position:80 ~show_right_margin:true
......
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