Commit a6d6cb69 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 e65a7c20
......@@ -527,7 +527,8 @@ let () =
*)
Hstr.iter
(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;
send_session_config_to_server ()
in
......@@ -822,7 +823,7 @@ let create_source_view =
~packing:scrolled_source_view#add () in
let source_view =
GSourceView2.source_view
~auto_indent:true
~auto_indent:gconfig.allow_source_editing
~insert_spaces_instead_of_tabs:true ~tab_width:2
~show_line_numbers: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