Skip to content

Commit 424678e

Browse files
authoredSep 21, 2024
Merge pull request #3 from jwdj/master
merge with 1.3.8.7 of jwdj
2 parents 5355f73 + 08eebd2 commit 424678e

File tree

3 files changed

+10
-5
lines changed

3 files changed

+10
-5
lines changed
 

‎CHANGES

+1
Original file line numberDiff line numberDiff line change
@@ -629,3 +629,4 @@ different panes. Tie/untie option added for notes. Broken rhythm
629629
- Fixed: Playing selection gave an error: AttributeError: 'bytes' object has no attribute 'encode' (https://github.com/jwdj/EasyABC/issues/69)
630630
- Fixed: Now automatic insertion of bars (|) only when no text is selected
631631
- Fixed: FluidSynth issues on 64 bit Mac (thanks Mark)
632+
- Fixed: No bars added within chords or comment

‎easy_abc.py

+8-4
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
program_name = 'EasyABC ' + program_version
55

66
# Copyright (C) 2011-2014 Nils Liberg (mail: kotorinl at yahoo.co.uk)
7-
# Copyright (C) 2015-2021 Seymour Shlien (mail: fy733@ncf.ca), Jan Wybren de Jong (jw_de_jong at yahoo dot com)
7+
# Copyright (C) 2015-2024 Seymour Shlien (mail: fy733@ncf.ca), Jan Wybren de Jong (jw_de_jong at yahoo dot com)
88
#
99
# This program is free software: you can redistribute it and/or modify
1010
# it under the terms of the GNU Lesser General Public License as published by
@@ -6799,10 +6799,10 @@ def OnCharEvent(self, evt):
67996799
if is_inside_field:
68006800
evt.Skip()
68016801
return
6802-
6802+
is_inside_chord = self.position_is_in_chord(cur_pos)
68036803
at_end_of_line = not line[caret:].strip(' \r\n|:][')
68046804
use_typing_assist = self.mni_TA_active.IsChecked()
6805-
if use_typing_assist and in_music_code:
6805+
if use_typing_assist and in_music_code and not is_inside_chord:
68066806
if c == '-' and no_selection:
68076807
self.AddTextWithUndo('- ')
68086808
return
@@ -7160,7 +7160,11 @@ def replace_selection(self, text):
71607160
def position_is_music_code(self, position):
71617161
style_at = self.editor.GetStyleAt
71627162
return style_at(position) == self.styler.STYLE_DEFAULT \
7163-
and style_at(position-1) not in (self.styler.STYLE_EMBEDDED_FIELD_VALUE, self.styler.STYLE_EMBEDDED_FIELD)
7163+
and style_at(position-1) not in (self.styler.STYLE_EMBEDDED_FIELD_VALUE, self.styler.STYLE_EMBEDDED_FIELD, self.styler.STYLE_COMMENT_NORMAL)
7164+
7165+
def position_is_in_chord(self, position):
7166+
style_at = self.editor.GetStyleAt
7167+
return style_at(position-1) == self.styler.STYLE_CHORD
71647168

71657169
def OnKeyDownEvent(self, evt):
71667170
# temporary work-around for what seems to be a scintilla bug on Mac:

‎setupEasyABC.iss

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
; Seymour Shlien
1010

1111
#define MyAppName "EasyABC"
12-
#define MyAppVersion "1.3.8.6"
12+
#define MyAppVersion "1.3.8.7"
1313
#define MyAppPublisher "Seymour Shlien"
1414
#define MyAppURL "ifdo.ca/~seymour/easy/"
1515
#define MyAppExeName "easy_abc.exe"

0 commit comments

Comments
 (0)