Commits

Herbert Breunung committed cc75a42

think i allow tabs

Comments (0)

Files changed (4)

lib/Kephra/App/Bar/Document.pm

 sub add_page {
 	my ($self, $label, $position, $set_active, $panel ) = @_;
 
-	$label       = ''     unless defined $label;
+	$label         = ''   unless defined $label;
 
 	my $pages      = $self->GetPageCount;
 	my $active_pos = $self->GetSelection;

lib/Kephra/App/Panel/Editor.pm

 }
 
 sub create_document {
-	my $file_path = shift;
+	my $file = shift;
 	my $doc = Kephra::API::active_doc();
 	my $main_doc_bar = _active_docbar();
 
 	# overwrite empty doc
-	if ($doc and $doc->editor->is_empty and $file_path) {
-		$doc->assign_file($file_path);
+	if ($doc and $doc->editor->is_empty and $file) {
+		$doc->assign_file($file);
 		$main_doc_bar->SetPageText( $main_doc_bar->GetSelection , $doc->file_name );
 		$doc->editor->focus();
 	# make new editor
 		my $ed = Kephra::App::Editor->new( $main_doc_bar );
 		$doc = Kephra::Document->new();
 		$doc->editor( $ed );
-		$doc->assign_file($file_path);
+		$doc->assign_file($file);
 		Kephra::DocumentStash::add( $doc );
 		$main_doc_bar->add_page( $doc->file_name, -1, 1, $ed) ;
 	}

lib/Kephra/Document.pm

 use File::Spec;
 
 has editor => (
-    is  => 'rw',
-    isa => sub {die "$_[0] is no editor" unless ref $_[0] eq 'Kephra::App::Editor'},
+	is  => 'rw',
+	isa => sub {die "$_[0] is no editor" unless ref $_[0] eq 'Kephra::App::Editor'},
 );
 has file_path    => ( is  => 'rw', );
 has file_dir     => ( is  => 'rw', );
 has marked_lines => ( is  => 'rw', );
 
 sub assign_file {
-    my ($self, $file_path) = @_;
-    return unless $file_path;
-    $file_path = Kephra::File::_normalize_name($file_path);
-    $self->file_path($file_path);
-    my @path_parts = File::Spec->splitpath( $_[0]->file_path );
-    $self->file_dir( $path_parts[1] );
-    $self->file_name( $path_parts[2] );
-    $self;
+	my ($self, $file_path) = @_;
+	return unless $file_path;
+	$file_path = Kephra::File::_normalize_name($file_path);
+	$self->file_path($file_path);
+	my @path_parts = File::Spec->splitpath( $_[0]->file_path );
+	$self->file_dir( $path_parts[1] );
+	$self->file_name( $path_parts[2] );
+	$self;
 }
 sub insert_before_caret {}
 sub insert_after_caret {}

lib/StyleGuide.pod

 =head2 Technical Details
 
     indention size = 4
-    use of tabs      no
+    use of tabs      yes
 
 
 =head2 Variable Names