Skip to content

Commit

Permalink
Only insert timestamp if not at start of file (see #8)
Browse files Browse the repository at this point in the history
  • Loading branch information
innir committed Jun 26, 2017
1 parent f037de6 commit b99a96b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bin/gtranscribe
Original file line number Diff line number Diff line change
Expand Up @@ -471,7 +471,7 @@ class gTranscribeWindow:

def on_text_insert(self, widget, event):
keyname = Gdk.keyval_name(event.keyval)
if keyname == 'Return':
if keyname == 'Return' and self.position > 0:
pos_str = ' [' + trim(
ns_to_time(self.position).strftime(self.time_str)) + ']'
self.text_buffer.insert_at_cursor(pos_str)
Expand Down

0 comments on commit b99a96b

Please sign in to comment.