Compare commits
8 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
463b927813 | ||
|
|
09ecd14764 | ||
|
|
89912be500 | ||
|
|
3b4e3b0e42 | ||
|
|
7a726c035c | ||
|
|
430a98e9ad | ||
|
|
01de6b4d18 | ||
|
|
1652c1dcf3 |
14
.editorconfig
Normal file
14
.editorconfig
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
# Copying and distribution of this file, with or without modification,
|
||||||
|
# are permitted in any medium without royalty provided this notice is
|
||||||
|
# preserved. This file is offered as-is, without any warranty.
|
||||||
|
|
||||||
|
# EditorConfig
|
||||||
|
# http://EditorConfig.org
|
||||||
|
|
||||||
|
# top-most EditorConfig file
|
||||||
|
root = true
|
||||||
|
|
||||||
|
[*]
|
||||||
|
end_of_line = lf
|
||||||
|
insert_final_newline = true
|
||||||
|
charset = utf-8
|
||||||
@@ -5,7 +5,8 @@ Termux app
|
|||||||
|
|
||||||
Termux is an Android terminal app and Linux environment.
|
Termux is an Android terminal app and Linux environment.
|
||||||
|
|
||||||
* [Termux on Google Play](http://play.google.com/store/apps/details?id=com.termux)
|
* [Termux on Google Play Store](https://play.google.com/store/apps/details?id=com.termux)
|
||||||
|
* [Termux on F-Droid](https://f-droid.org/repository/browse/?fdid=com.termux)
|
||||||
* [termux.com](http://termux.com)
|
* [termux.com](http://termux.com)
|
||||||
* [Termux Help](http://termux.com/help/)
|
* [Termux Help](http://termux.com/help/)
|
||||||
* [Termux app on GitHub](https://github.com/termux/termux-app)
|
* [Termux app on GitHub](https://github.com/termux/termux-app)
|
||||||
@@ -14,7 +15,7 @@ Termux is an Android terminal app and Linux environment.
|
|||||||
|
|
||||||
License
|
License
|
||||||
=======
|
=======
|
||||||
Released under the GPLv3 license. Contains code from `Terminal Emulator for Android` which is released under the Apache License.
|
Released under [the GPLv3 license](https://www.gnu.org/licenses/gpl.html). Contains code from `Terminal Emulator for Android` which is released under [the Apache License 2.0](https://www.apache.org/licenses/).
|
||||||
|
|
||||||
Building JNI libraries
|
Building JNI libraries
|
||||||
======================
|
======================
|
||||||
@@ -29,9 +30,9 @@ Terminal resources
|
|||||||
Terminal emulators
|
Terminal emulators
|
||||||
==================
|
==================
|
||||||
* VTE (libvte): Terminal emulator widget for GTK+, mainly used in gnome-terminal. [Source](https://github.com/GNOME/vte), [Open Issues](https://bugzilla.gnome.org/buglist.cgi?quicksearch=product%3A%22vte%22+), and [All (including closed) issues](https://bugzilla.gnome.org/buglist.cgi?bug_status=RESOLVED&bug_status=VERIFIED&chfield=resolution&chfieldfrom=-2000d&chfieldvalue=FIXED&product=vte&resolution=FIXED).
|
* VTE (libvte): Terminal emulator widget for GTK+, mainly used in gnome-terminal. [Source](https://github.com/GNOME/vte), [Open Issues](https://bugzilla.gnome.org/buglist.cgi?quicksearch=product%3A%22vte%22+), and [All (including closed) issues](https://bugzilla.gnome.org/buglist.cgi?bug_status=RESOLVED&bug_status=VERIFIED&chfield=resolution&chfieldfrom=-2000d&chfieldvalue=FIXED&product=vte&resolution=FIXED).
|
||||||
* iTerm 2: Mac terminal application. [Source](https://github.com/gnachman/iTerm2), [Issues](https://gitlab.com/gnachman/iterm2/issues) and [Documentation](http://www.iterm2.com/documentation.html) (which includes [iTerm2 proprietary escape codes](http://www.iterm2.com/documentation-escape-codes.html)).
|
* iTerm 2: OS X terminal application. [Source](https://github.com/gnachman/iTerm2), [Issues](https://gitlab.com/gnachman/iterm2/issues) and [Documentation](http://www.iterm2.com/documentation.html) (which includes [iTerm2 proprietary escape codes](http://www.iterm2.com/documentation-escape-codes.html)).
|
||||||
* Konsole: KDE terminal application. [Source](https://projects.kde.org/projects/kde/applications/konsole/repository), in particular [tests](https://projects.kde.org/projects/kde/applications/konsole/repository/revisions/master/show/tests), [Bugs](https://bugs.kde.org/buglist.cgi?bug_severity=critical&bug_severity=grave&bug_severity=major&bug_severity=crash&bug_severity=normal&bug_severity=minor&bug_status=UNCONFIRMED&bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&product=konsole) and [Wishes](https://bugs.kde.org/buglist.cgi?bug_severity=wishlist&bug_status=UNCONFIRMED&bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&product=konsole).
|
* Konsole: KDE terminal application. [Source](https://projects.kde.org/projects/kde/applications/konsole/repository), in particular [tests](https://projects.kde.org/projects/kde/applications/konsole/repository/revisions/master/show/tests), [Bugs](https://bugs.kde.org/buglist.cgi?bug_severity=critical&bug_severity=grave&bug_severity=major&bug_severity=crash&bug_severity=normal&bug_severity=minor&bug_status=UNCONFIRMED&bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&product=konsole) and [Wishes](https://bugs.kde.org/buglist.cgi?bug_severity=wishlist&bug_status=UNCONFIRMED&bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&product=konsole).
|
||||||
* hterm: Javascript terminal implementation from chromium. [Source](https://github.com/chromium/hterm), including [tests](https://github.com/chromium/hterm/blob/master/js/hterm_vt_tests.js), and [google group](https://groups.google.com/a/chromium.org/forum/#!forum/chromium-hterm).
|
* hterm: JavaScript terminal implementation from Chromium. [Source](https://github.com/chromium/hterm), including [tests](https://github.com/chromium/hterm/blob/master/js/hterm_vt_tests.js), and [Google group](https://groups.google.com/a/chromium.org/forum/#!forum/chromium-hterm).
|
||||||
* xterm: The grandfather of terminal emulators. [Source](http://invisible-island.net/datafiles/release/xterm.tar.gz).
|
* xterm: The grandfather of terminal emulators. [Source](http://invisible-island.net/datafiles/release/xterm.tar.gz).
|
||||||
* Connectbot: Android SSH client. [Source](https://github.com/connectbot/connectbot)
|
* Connectbot: Android SSH client. [Source](https://github.com/connectbot/connectbot)
|
||||||
* Android Terminal Emulator: Android terminal app which Termux terminal handling is based on. Inactive. [Source](https://github.com/jackpal/Android-Terminal-Emulator).
|
* Android Terminal Emulator: Android terminal app which Termux terminal handling is based on. Inactive. [Source](https://github.com/jackpal/Android-Terminal-Emulator).
|
||||||
|
|||||||
@@ -14,8 +14,8 @@ android {
|
|||||||
applicationId "com.termux"
|
applicationId "com.termux"
|
||||||
minSdkVersion 21
|
minSdkVersion 21
|
||||||
targetSdkVersion 22
|
targetSdkVersion 22
|
||||||
versionCode 18
|
versionCode 19
|
||||||
versionName "0.18"
|
versionName "0.19"
|
||||||
}
|
}
|
||||||
|
|
||||||
signingConfigs {
|
signingConfigs {
|
||||||
|
|||||||
@@ -52,6 +52,7 @@ import android.view.View.OnClickListener;
|
|||||||
import android.view.View.OnKeyListener;
|
import android.view.View.OnKeyListener;
|
||||||
import android.view.View.OnLongClickListener;
|
import android.view.View.OnLongClickListener;
|
||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
|
import android.view.WindowManager;
|
||||||
import android.view.inputmethod.InputMethodManager;
|
import android.view.inputmethod.InputMethodManager;
|
||||||
import android.widget.AdapterView;
|
import android.widget.AdapterView;
|
||||||
import android.widget.AdapterView.OnItemClickListener;
|
import android.widget.AdapterView.OnItemClickListener;
|
||||||
@@ -414,18 +415,22 @@ public final class TermuxActivity extends Activity implements ServiceConnection
|
|||||||
TermuxInstaller.setupIfNeeded(TermuxActivity.this, new Runnable() {
|
TermuxInstaller.setupIfNeeded(TermuxActivity.this, new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
if (TermuxPreferences.isShowWelcomeDialog(TermuxActivity.this)) {
|
try {
|
||||||
new AlertDialog.Builder(TermuxActivity.this).setTitle(R.string.welcome_dialog_title).setMessage(R.string.welcome_dialog_body)
|
if (TermuxPreferences.isShowWelcomeDialog(TermuxActivity.this)) {
|
||||||
.setCancelable(false).setPositiveButton(android.R.string.ok, null)
|
new AlertDialog.Builder(TermuxActivity.this).setTitle(R.string.welcome_dialog_title).setMessage(R.string.welcome_dialog_body)
|
||||||
.setNegativeButton(R.string.welcome_dialog_dont_show_again_button, new DialogInterface.OnClickListener() {
|
.setCancelable(false).setPositiveButton(android.R.string.ok, null)
|
||||||
@Override
|
.setNegativeButton(R.string.welcome_dialog_dont_show_again_button, new DialogInterface.OnClickListener() {
|
||||||
public void onClick(DialogInterface dialog, int which) {
|
@Override
|
||||||
TermuxPreferences.disableWelcomeDialog(TermuxActivity.this);
|
public void onClick(DialogInterface dialog, int which) {
|
||||||
dialog.dismiss();
|
TermuxPreferences.disableWelcomeDialog(TermuxActivity.this);
|
||||||
}
|
dialog.dismiss();
|
||||||
}).show();
|
}
|
||||||
|
}).show();
|
||||||
|
}
|
||||||
|
addNewSession(false, null);
|
||||||
|
} catch (WindowManager.BadTokenException e) {
|
||||||
|
// Activity finished - ignore.
|
||||||
}
|
}
|
||||||
addNewSession(false, null);
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -21,6 +21,7 @@ import android.content.DialogInterface.OnDismissListener;
|
|||||||
import android.system.Os;
|
import android.system.Os;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
import android.util.Pair;
|
import android.util.Pair;
|
||||||
|
import android.view.WindowManager;
|
||||||
|
|
||||||
import com.termux.R;
|
import com.termux.R;
|
||||||
import com.termux.terminal.EmulatorDebug;
|
import com.termux.terminal.EmulatorDebug;
|
||||||
@@ -138,27 +139,35 @@ final class TermuxInstaller {
|
|||||||
activity.runOnUiThread(new Runnable() {
|
activity.runOnUiThread(new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
new AlertDialog.Builder(activity).setTitle(R.string.bootstrap_error_title).setMessage(R.string.bootstrap_error_body)
|
try {
|
||||||
.setNegativeButton(R.string.bootstrap_error_abort, new OnClickListener() {
|
new AlertDialog.Builder(activity).setTitle(R.string.bootstrap_error_title).setMessage(R.string.bootstrap_error_body)
|
||||||
@Override
|
.setNegativeButton(R.string.bootstrap_error_abort, new OnClickListener() {
|
||||||
public void onClick(DialogInterface dialog, int which) {
|
@Override
|
||||||
dialog.dismiss();
|
public void onClick(DialogInterface dialog, int which) {
|
||||||
activity.finish();
|
dialog.dismiss();
|
||||||
}
|
activity.finish();
|
||||||
}).setPositiveButton(R.string.bootstrap_error_try_again, new OnClickListener() {
|
}
|
||||||
@Override
|
}).setPositiveButton(R.string.bootstrap_error_try_again, new OnClickListener() {
|
||||||
public void onClick(DialogInterface dialog, int which) {
|
@Override
|
||||||
dialog.dismiss();
|
public void onClick(DialogInterface dialog, int which) {
|
||||||
TermuxInstaller.setupIfNeeded(activity, whenDone);
|
dialog.dismiss();
|
||||||
}
|
TermuxInstaller.setupIfNeeded(activity, whenDone);
|
||||||
}).show();
|
}
|
||||||
|
}).show();
|
||||||
|
} catch (WindowManager.BadTokenException e) {
|
||||||
|
// Activity already dismissed - ignore.
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
} finally {
|
} finally {
|
||||||
activity.runOnUiThread(new Runnable() {
|
activity.runOnUiThread(new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
progress.dismiss();
|
try {
|
||||||
|
progress.dismiss();
|
||||||
|
} catch (RuntimeException e) {
|
||||||
|
// Activity already dismissed - ignore.
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -80,6 +80,7 @@ final class TerminalRenderer {
|
|||||||
|
|
||||||
TerminalRow lineObject = screen.allocateFullLineIfNecessary(screen.externalToInternalRow(row));
|
TerminalRow lineObject = screen.allocateFullLineIfNecessary(screen.externalToInternalRow(row));
|
||||||
final char[] line = lineObject.mText;
|
final char[] line = lineObject.mText;
|
||||||
|
final int charsUsedInLine = lineObject.getSpaceUsed();
|
||||||
|
|
||||||
int lastRunStyle = 0;
|
int lastRunStyle = 0;
|
||||||
boolean lastRunInsideCursor = false;
|
boolean lastRunInsideCursor = false;
|
||||||
@@ -125,7 +126,7 @@ final class TerminalRenderer {
|
|||||||
measuredWidthForRun += measuredCodePointWidth;
|
measuredWidthForRun += measuredCodePointWidth;
|
||||||
column += codePointWcWidth;
|
column += codePointWcWidth;
|
||||||
currentCharIndex += charsForCodePoint;
|
currentCharIndex += charsForCodePoint;
|
||||||
while (WcWidth.width(line, currentCharIndex) <= 0) {
|
while (currentCharIndex < charsUsedInLine && WcWidth.width(line, currentCharIndex) <= 0) {
|
||||||
// Eat combining chars so that they are treated as part of the last non-combining code point,
|
// Eat combining chars so that they are treated as part of the last non-combining code point,
|
||||||
// instead of e.g. being considered inside the cursor in the next run.
|
// instead of e.g. being considered inside the cursor in the next run.
|
||||||
currentCharIndex += Character.isHighSurrogate(line[currentCharIndex]) ? 2 : 1;
|
currentCharIndex += Character.isHighSurrogate(line[currentCharIndex]) ? 2 : 1;
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ buildscript {
|
|||||||
jcenter()
|
jcenter()
|
||||||
}
|
}
|
||||||
dependencies {
|
dependencies {
|
||||||
classpath 'com.android.tools.build:gradle:1.3.1'
|
classpath 'com.android.tools.build:gradle:1.5.0'
|
||||||
|
|
||||||
// NOTE: Do not place your application dependencies here; they belong
|
// NOTE: Do not place your application dependencies here; they belong
|
||||||
// in the individual module build.gradle files
|
// in the individual module build.gradle files
|
||||||
|
|||||||
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
Binary file not shown.
4
gradle/wrapper/gradle-wrapper.properties
vendored
4
gradle/wrapper/gradle-wrapper.properties
vendored
@@ -1,6 +1,6 @@
|
|||||||
#Thu Oct 22 22:50:58 CEST 2015
|
#Fri Nov 06 00:04:44 CET 2015
|
||||||
distributionBase=GRADLE_USER_HOME
|
distributionBase=GRADLE_USER_HOME
|
||||||
distributionPath=wrapper/dists
|
distributionPath=wrapper/dists
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
zipStorePath=wrapper/dists
|
zipStorePath=wrapper/dists
|
||||||
distributionUrl=https\://services.gradle.org/distributions/gradle-2.7-bin.zip
|
distributionUrl=https\://services.gradle.org/distributions/gradle-2.8-bin.zip
|
||||||
|
|||||||
4
gradlew
vendored
4
gradlew
vendored
@@ -56,9 +56,9 @@ while [ -h "$PRG" ] ; do
|
|||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
SAVED="`pwd`"
|
SAVED="`pwd`"
|
||||||
cd "`dirname \"$PRG\"`/" >&-
|
cd "`dirname \"$PRG\"`/" >/dev/null
|
||||||
APP_HOME="`pwd -P`"
|
APP_HOME="`pwd -P`"
|
||||||
cd "$SAVED" >&-
|
cd "$SAVED" >/dev/null
|
||||||
|
|
||||||
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
|
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user