1. Herbert Breunung
  2. Kephra

Commits

Herbert Breunung  committed 8b1b97a

cleaning editor up a bit

  • Participants
  • Parent commits 59f9660
  • Branches default

Comments (0)

Files changed (3)

File lib/Kephra/App/Editor.pm

View file
  • Ignore whitespace
 	$self->mount_events();
 	$self->set_tab_size(4);
 	$self->set_tab_usage(1);
-
 	return $self;
 }
 
 
 sub mount_events {
 	my ($self, @which) = @_;
-	#$self->DragAcceptFiles(1);
-	$self->SetAcceleratorTable(
-		Wx::AcceleratorTable->new(
-			#[&Wx::wxACCEL_CTRL, ord 'n', 1000],
-	));
+	$self->DragAcceptFiles(1) if $^O eq 'MSWin32'; # enable drop files on win
 	$self->SetDropTarget( Kephra::App::Editor::TextDropTarget->new($self) );
-	#$self->SetAcceleratorTable( Wx::AcceleratorTable->new() );
-	#Wx::Event::EVT_MENU( $self, 1000, sub { $_[1]->Skip; } );
-	#Wx::Event::EVT_STC_SAVEPOINTREACHED($self, -1, \&Kephra::File::savepoint_reached);
-	#Wx::Event::EVT_STC_SAVEPOINTLEFT($self, -1, \&Kephra::File::savepoint_left);
 	Wx::Event::EVT_STC_CHANGE       ($self, -1, sub {
 		my ($ed, $event) = @_;
+		$ed->{'change_pos'} = $ed->GetCurrentPos;
 		$event->Skip;
-		$ed->{'change_pos'} = $ed->GetCurrentPos;
 	} );
 	Wx::Event::EVT_KEY_DOWN ($self, sub {
 		my ($ed, $event) = @_;
 	#Wx::Event::EVT_STC_HOTSPOT_DCLICK($self, sub{}) 
 	#Wx::Event::EVT_STC_CALLTIP_CLICK($self, sub{}) 
 	#Wx::Event::EVT_STC_AUTOCOMP_SELECTION($self, sub{})
+	#$self->SetAcceleratorTable( Wx::AcceleratorTable->new() );
+	#Wx::Event::EVT_MENU( $self, 1000, sub { $_[1]->Skip; } );
+	#Wx::Event::EVT_STC_SAVEPOINTREACHED($self, -1, \&Kephra::File::savepoint_reached);
+	#Wx::Event::EVT_STC_SAVEPOINTLEFT($self, -1, \&Kephra::File::savepoint_left);
+	$self->SetAcceleratorTable(
+		Wx::AcceleratorTable->new(
+			[&Wx::wxACCEL_CTRL, ord 'n', 1000],
+	));

File lib/Kephra/Edit.pm

View file
  • Ignore whitespace
 	$text = '' unless defined $text and $text;
 }
 
-#sub last_position {	my ($self) = @_; 	$self->} GetFirstVisibleLine
+#sub visual_height {	my ($self) = @_; 	$self->GetFirstVisibleLine; $self->}
 
 sub replace {
 	my ($self) = @_;

File lib/Kephra/Edit/Search.pm

View file
  • Ignore whitespace
  '-select-line-start'=>{sub=>'$ed->HomeExtend',        label=>'Line Start',   keys=>'shift+home'},
  '-select-line-end'  =>{sub=>'$ed->LineEndExtend',     label=>'Line End',     keys=>'shift+end' },
  #'-goto-line-up'     =>{sub=>'$ed->LineUp',            label=>'Line Up',     keys =>'up' },
- #'-goto-line-down'   =>{sub=>'$ed->LineDown',          label=>'Line Down',   keys => 'down' },
+ #'-goto-line-down'   =>{sub=>'$ed->LineDown',          label=>'Line Down',   keys =>'down' },
  '-select-line-up'   =>{sub=>'$ed->LineUpExtend',      label=>'Line Up',      keys=>'shift+up' },
  '-select-line-down' =>{sub=>'$ed->LineDownExtend',    label=>'Line Down',    keys=>'shift+down' },
  '-goto-page-up'     =>{sub=>'$ed->PageUp',            label=>'Page Up',      keys=>'pageup' },