-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
split: ignore blank lines when IgnoreBlanks is selected.
--ignore-blanks should ignore blank lines as well as spaces and tabs. We don't ignore all newline characters, only those at the end of blank lines. We do this even in "line" mode. This addresses github issue #27. Signed-off-by: NeilBrown <[email protected]>
- Loading branch information
Showing
4 changed files
with
149 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
package com.termux.terminal; | ||
|
||
import androidx.annotation.NonNull; | ||
import androidx.annotation.Nullable; | ||
|
||
/** | ||
* The interface for communication between {@link TerminalSession} and its client. It is used to | ||
* send callbacks to the client when {@link TerminalSession} changes or for sending other | ||
* back data to the client like logs. | ||
*/ | ||
public interface TerminalSessionClient { | ||
|
||
void onTextChanged(@NonNull TerminalSession changedSession); | ||
|
||
void onTitleChanged(@NonNull TerminalSession changedSession); | ||
|
||
void onSessionFinished(@NonNull TerminalSession finishedSession); | ||
|
||
void onCopyTextToClipboard(@NonNull TerminalSession session, String text); | ||
|
||
void onPasteTextFromClipboard(@Nullable TerminalSession session); | ||
|
||
void onBell(@NonNull TerminalSession session); | ||
|
||
void onColorsChanged(@NonNull TerminalSession session); | ||
|
||
void onTerminalCursorStateChange(boolean state); | ||
|
||
void setTerminalShellPid(@NonNull TerminalSession session, int pid); | ||
|
||
|
||
|
||
Integer getTerminalCursorStyle(); | ||
|
||
boolean shouldEnableDarkTheme(); | ||
|
||
|
||
|
||
void logError(String tag, String message); | ||
|
||
void logWarn(String tag, String message); | ||
|
||
void logInfo(String tag, String message); | ||
|
||
void logDebug(String tag, String message); | ||
|
||
void logVerbose(String tag, String message); | ||
|
||
void logStackTraceWithMessage(String tag, String message, Exception e); | ||
|
||
void logStackTrace(String tag, Exception e); | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
package com.termux.terminal; | ||
|
||
import androidx.annotation.NonNull; | ||
import androidx.annotation.Nullable; | ||
|
||
/** | ||
* The interface for communication between {@link TerminalSession} and its client. It is used to | ||
* send callbacks to the client when {@link TerminalSession} changes or for sending other | ||
* back data to the client like logs. | ||
*/ | ||
public interface TerminalSessionClient { | ||
|
||
void onTextChanged(@NonNull TerminalSession changedSession); | ||
|
||
void onTitleChanged(@NonNull TerminalSession changedSession); | ||
|
||
void onSessionFinished(@NonNull TerminalSession finishedSession); | ||
|
||
void onCopyTextToClipboard(@NonNull TerminalSession session, String text); | ||
|
||
void onPasteTextFromClipboard(@Nullable TerminalSession session); | ||
|
||
void onBell(@NonNull TerminalSession session); | ||
|
||
void onColorsChanged(@NonNull TerminalSession session); | ||
|
||
void onTerminalCursorStateChange(boolean state); | ||
|
||
void setTerminalShellPid(@NonNull TerminalSession session, int pid); | ||
|
||
|
||
|
||
Integer getTerminalCursorStyle(); | ||
|
||
|
||
|
||
void logError(String tag, String message); | ||
|
||
void logWarn(String tag, String message); | ||
|
||
void logInfo(String tag, String message); | ||
|
||
void logDebug(String tag, String message); | ||
|
||
void logVerbose(String tag, String message); | ||
|
||
void logStackTraceWithMessage(String tag, String message, Exception e); | ||
|
||
void logStackTrace(String tag, Exception e); | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
diff --git a/terminal-emulator/src/main/java/com/termux/terminal/TerminalSessionClient.java b/terminal-emulator/src/main/java/com/termux/terminal/TerminalSessionClient.java | ||
index f6f6fdcc2d78..3531173032b4 100644 | ||
--- a/terminal-emulator/src/main/java/com/termux/terminal/TerminalSessionClient.java | ||
+++ b/terminal-emulator/src/main/java/com/termux/terminal/TerminalSessionClient.java | ||
@@ -30,6 +30,8 @@ public interface TerminalSessionClient { | ||
|
||
Integer getTerminalCursorStyle(); | ||
|
||
+ boolean shouldEnableDarkTheme(); | ||
+ | ||
void logError(String tag, String message); | ||
|
||
void logWarn(String tag, String message); |