Skip to content

Commit

Permalink
Merge pull request #37 from Mehrabbruno/main
Browse files Browse the repository at this point in the history
Increase terminal focus area
  • Loading branch information
serapath authored Feb 8, 2024
2 parents 1a9f703 + 15cd764 commit 948a60b
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 14 deletions.
21 changes: 14 additions & 7 deletions bundle.js
Original file line number Diff line number Diff line change
Expand Up @@ -10718,6 +10718,7 @@ function tab_window (opts = default_opts, protocol) {
const ro = new ResizeObserver(entries => {
console.log('ResizeObserver:terminal:resize')
const scroll_channel = state.net[state.aka.scrollbar]
textAreaAdjust()
scroll_channel.send({
head: [id, scroll_channel.send.id, scroll_channel.mid++],
refs: { },
Expand Down Expand Up @@ -10776,7 +10777,6 @@ function tab_window (opts = default_opts, protocol) {
// ----------------------------------------
// ELEMENTS
// ----------------------------------------
input.onkeyup = textAreaAdjust
input.onkeydown = handleKeyDown

{ // scrollbar
Expand Down Expand Up @@ -10829,9 +10829,13 @@ function tab_window (opts = default_opts, protocol) {

return el

function textAreaAdjust (e) {
e.target.style.height = "1px";
e.target.style.height = (25+e.target.scrollHeight)+"px";
function textAreaAdjust () {
if(scrollbar_wrapper.classList.contains('fullscreen')){
input.style.minHeight = `${window.innerHeight - 110 - history.getBoundingClientRect().height}px`
}
else{
input.style.minHeight = `${194 - history.getBoundingClientRect().height}px`
}
}
function handleKeyDown (e) {
if (e.which === 13){
Expand Down Expand Up @@ -10874,7 +10878,6 @@ function tab_window (opts = default_opts, protocol) {
response = command_list
const arguments = data.split('/')
arguments.forEach(argument => {
console.error(argument)
if(argument){
response = response[argument]
check = false
Expand Down Expand Up @@ -10908,7 +10911,6 @@ function tab_window (opts = default_opts, protocol) {
response = command_list
const arguments = data.split('/')
arguments.forEach(argument => {
console.error(response)
if(argument){
response = response[argument]
check = false
Expand Down Expand Up @@ -10981,6 +10983,7 @@ function tab_window (opts = default_opts, protocol) {
}
function toggle_fullscreen (msg){
scrollbar_wrapper.classList.toggle('fullscreen')
textAreaAdjust()
}
async function on_shrink (){
scrollbar_wrapper.classList.add('shrink')
Expand Down Expand Up @@ -11024,12 +11027,16 @@ function get_theme() {
border: none;
outline: none;
width: 100%;
min-height: 194px;
text-indent: 20px;
font-family: Silkscreen;
font-size: 16px;
padding: 0;
resize: none;
}
.tab_wrapper .scrollbar_wrapper.fullscreen #input{
min-height: calc(100vh - 110px);
}
.tab_wrapper .dollar{
position: relative;
}
Expand Down Expand Up @@ -11147,7 +11154,7 @@ function terminal (opts = default_opts, protocol) {
refs: { },
type: 'handle_scroll',
})
//Added this to avoid a very sticky situation where the height of tabs_window needs to be changed when scrollbar appear
//Added this to avoid a very sticky situation where the height of tabs_window needs to be changed when scrollbar appears
if(scrollbar_wrapper.clientHeight !== status.scrollbar_height){
status.scrollbar_height = scrollbar_wrapper.clientHeight
if(scrollbar_wrapper.clientHeight > 0)
Expand Down
19 changes: 13 additions & 6 deletions src/node_modules/tab-window/tab-window.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/node_modules/terminal/terminal.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 948a60b

Please sign in to comment.