Style adjustment and minor refactor.
This commit is contained in:
parent
e3273b444b
commit
9c0a06f19a
2 changed files with 3 additions and 5 deletions
|
@ -98,8 +98,8 @@ module Diakonos
|
|||
end
|
||||
end
|
||||
|
||||
if @settings[ "auto_read_only" ] and @name
|
||||
if not File.writable?(@name) and File.exist?(@name)
|
||||
if @settings[ "auto_read_only" ] && @name
|
||||
if ! File.writable?( @name ) && File.exist?( @name )
|
||||
@read_only = true
|
||||
end
|
||||
end
|
||||
|
|
|
@ -261,10 +261,8 @@ module Diakonos
|
|||
"found_cursor_start", "convert_tabs", 'delete_newline_on_delete_to_eol',
|
||||
'suppress_welcome', 'strip_trailing_whitespace_on_save',
|
||||
'find.return_on_abort', 'fuzzy_file_find', 'view.line_numbers',
|
||||
'find.show_context_after', 'view.pairs.highlight'
|
||||
'find.show_context_after', 'view.pairs.highlight', 'auto_read_only'
|
||||
@settings[ command ] = arg.to_b
|
||||
when "auto_read_only"
|
||||
@settings [ command ] = arg.to_b
|
||||
when "context.format", "context.separator.format", "status.format", 'view.line_numbers.format'
|
||||
@settings[ command ] = Display.to_formatting( arg )
|
||||
when /view\.column_markers\.(.+?)\.format/
|
||||
|
|
Loading…
Reference in a new issue