1import { Controller } from "@hotwired/stimulus"; 2 3export default class extends Controller { 4 connect() { 5 this.autogrow(); 6 } 7 8 autogrow() { 9 // Check if cursor is at the end before resizing 10 const cursorAtEnd = this.element.selectionStart === this.element.value.length; 11 12 // Resize the textarea 13 this.element.style.height = "auto"; 14 this.element.style.height = `${this.element.scrollHeight}px`; 15 16 // If cursor was at the end, scroll to bottom 17 if (cursorAtEnd) { 18 this.element.scrollTop = this.element.scrollHeight; 19 } 20 } 21};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.