Skip to content

Commit

Permalink
(formatting)
Browse files Browse the repository at this point in the history
  • Loading branch information
chucker committed Apr 11, 2023
1 parent 36d6fa4 commit f7d1097
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions CoreTootin/Controls/BaseComposerTextView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,12 @@ open class BaseComposerTextView: SuggestionTextView
public var insertDoubleNewLines: Bool = false

@IBOutlet
public weak var submitControl: NSControl? = nil
public var submitControl: NSControl? = nil

@IBOutlet
public weak var pasteDelegate: BaseComposerTextViewPasteDelegate? = nil

public override func insertNewline(_ sender: Any?)
override public func insertNewline(_ sender: Any?)
{
if activeSuggestionWindowController?.isWindowVisible == true
{
Expand All @@ -52,17 +52,17 @@ open class BaseComposerTextView: SuggestionTextView

public func insertAttributedString(_ attributedString: NSAttributedString)
{
guard let textStorage = self.textStorage else { return }
guard let textStorage = textStorage else { return }

let selectedRange = self.selectedRange()

if let undoManager = self.undoManager
if let undoManager = undoManager
{
let undoRange = NSMakeRange(selectedRange.location, attributedString.length)
let undoString = textStorage.attributedSubstring(from: selectedRange)
undoManager.registerUndo(withTarget: textStorage)
{
(textStorage) in textStorage.replaceCharacters(in: undoRange, with: undoString)
textStorage in textStorage.replaceCharacters(in: undoRange, with: undoString)
}
}

Expand All @@ -82,7 +82,7 @@ open class BaseComposerTextView: SuggestionTextView
{
/// Returns which pasteboard types the delegate is capable of reading from the pasteboard into the control.
func readablePasteboardTypes(for controlTextView: BaseComposerTextView,
proposedTypes: [NSPasteboard.PasteboardType]) -> [NSPasteboard.PasteboardType]
proposedTypes: [NSPasteboard.PasteboardType]) -> [NSPasteboard.PasteboardType]

/// Read the contents from the pasteboard into the control.
///
Expand Down

0 comments on commit f7d1097

Please sign in to comment.