mirror of
				https://github.com/fankes/termux-app.git
				synced 2025-10-25 13:19:21 +08:00 
			
		
		
		
	Extended keyboard: allow inline input
Ff the buffer is empty, send a newline, otherwise send the content of the buffer with the newline stripped. This way <Enter><Enter> means "insert the buffer content and send a newline", while a single <Enter> means just "insert the buffer content". Fixes #261.
This commit is contained in:
		| @@ -250,7 +250,9 @@ public final class TermuxActivity extends Activity implements ServiceConnection | |||||||
|                             TerminalSession session = getCurrentTermSession(); |                             TerminalSession session = getCurrentTermSession(); | ||||||
|                             if (session != null) { |                             if (session != null) { | ||||||
|                                 if (session.isRunning()) { |                                 if (session.isRunning()) { | ||||||
|                                     session.write(editText.getText().toString() + "\n"); |                                     String textToSend = editText.getText().toString(); | ||||||
|  |                                     if (textToSend.length() == 0) textToSend = "\n"; | ||||||
|  |                                     session.write(textToSend); | ||||||
|                                 } else { |                                 } else { | ||||||
|                                     removeFinishedSession(session); |                                     removeFinishedSession(session); | ||||||
|                                 } |                                 } | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user