Skip to content

Commit

Permalink
code cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
ensan-hcl committed Mar 25, 2024
1 parent 67d19a1 commit 62aea80
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
2 changes: 1 addition & 1 deletion azooKeyMac/KeyMap/KeyMap+hankaku2zenkaku.swift
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ extension KeyMap {
"]": "",
",": "",
".": "",
"/": "",
"/": ""
]

static func h2zMap(_ text: String) -> String {
Expand Down
9 changes: 3 additions & 6 deletions azooKeyMac/azooKeyMacInputController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@

import OSLog
import Cocoa
import CoreGraphics
import InputMethodKit
import KanaKanjiConverterModuleWithDefaultDictionary

Expand Down Expand Up @@ -258,7 +257,6 @@ class azooKeyMacInputController: IMKInputController {
}
}


@MainActor
override func deactivateServer(_ sender: Any!) {
self.kanaKanjiConverter.stopComposition()
Expand Down Expand Up @@ -403,7 +401,7 @@ class azooKeyMacInputController: IMKInputController {
case .roman:
client.selectMode("dev.ensan.inputmethod.azooKeyMac.Roman")
self.kanaKanjiConverter.sendToDicdataStore(.closeKeyboard)
case .japanese:
case .japanese:
client.selectMode("dev.ensan.inputmethod.azooKeyMac.Japanese")
}
case .appendToMarkedText(let string):
Expand Down Expand Up @@ -521,11 +519,11 @@ class azooKeyMacInputController: IMKInputController {
// これを使うことで文節単位変換の際に変換対象の文節の色が変わる
let highlight = self.mark(
forStyle: kTSMHiliteSelectedConvertedText,
at: NSMakeRange(NSNotFound, 0)
at: NSRange(location: NSNotFound, length: 0)
) as? [NSAttributedString.Key: Any]
let underline = self.mark(
forStyle: kTSMHiliteConvertedText,
at: NSMakeRange(NSNotFound, 0)
at: NSRange(location: NSNotFound, length: 0)
) as? [NSAttributedString.Key: Any]
let text = NSMutableAttributedString(string: "")
text.append(NSAttributedString(string: candidateString, attributes: highlight))
Expand Down Expand Up @@ -574,4 +572,3 @@ class azooKeyMacInputController: IMKInputController {
}
}
}

0 comments on commit 62aea80

Please sign in to comment.